You manage a 40-person shift roster. Your schedule lives in Excel โ dates in column A, shift names in column B (Morning / Afternoon / Night), worker names in column C. It works, mostly. But twice last quarter, someone got scheduled for two shifts in a single day. You caught the first one because a worker called in confused. You didn't catch the second one until 5:45 a.m.
Manually scanning 200 rows for duplicates before every posting cycle is where errors hide. Excel can do this for you โ automatically, on every row, the moment you paste in a new name.
A Conflict Alert column (column D) that instantly shows โ DOUBLE-BOOKED if any worker appears twice on the same date, or โ OK if the row is clean. It requires no macros, no add-ins โ just one formula you copy down the column.
Set Up Your Schedule Table
Your schedule table needs at minimum three columns. If yours already has them under different names, note the column letters โ you'll substitute them in the formula below.
| A | B | C | D |
|---|---|---|---|
| Date | Shift | Worker | Conflict Alert |
| 7/14/2026 | Morning | Rodriguez, M | โ formula goes here |
| 7/14/2026 | Afternoon | Chen, L | |
| 7/14/2026 | Morning | Rodriguez, M | โ duplicate! |
| 7/14/2026 | Night | Torres, J | |
| 7/15/2026 | Morning | Chen, L | |
| 7/15/2026 | Afternoon | Rodriguez, M |
Row 4 above is the problem row โ Rodriguez is already on Morning that day. The formula will flag both row 2 and row 4.
Enter the Core COUNTIFS Formula
Click cell D2 and type this formula, then press Enter:
=IF(COUNTIFS($A$2:$A$200, A2, $C$2:$C$200, C2) > 1, "โ DOUBLE-BOOKED", "โ OK")How it works โ reading left to right:
COUNTIFS($A$2:$A$200, A2, โฆ)Count every row where column A equals this row's date. The $ signs lock the range so it doesn't shift when you copy the formula down.โฆ $C$2:$C$200, C2)AND column C equals this row's worker name. COUNTIFS only counts rows where both conditions are true simultaneously.> 1If the count is greater than 1, this worker appears more than once on this date โ a conflict."โ DOUBLE-BOOKED"The text displayed when a conflict is found. You can change this to any flag you want.
Wrap With IFERROR to Handle Empty Rows
If column A or C has any blank cells, the basic formula can return an error instead of silently skipping. Wrap it with IFERROR so blanks display a dash instead:
=IFERROR(
IF(COUNTIFS($A$2:$A$200, A2, $C$2:$C$200, C2) > 1,
"โ DOUBLE-BOOKED",
"โ OK"),
"โ")The IFERROR(formula, "โ") wrapper catches any formula error and displays โ instead. This keeps the column clean even if you have header rows, subtotals, or gaps in your data.
Now copy cell D2 and paste it down through D200 (or however many rows your schedule uses). Every row with a double-booked worker will immediately show โ DOUBLE-BOOKED.
Extend With INDEX/MATCH to Identify Which Shift Conflicts
The basic formula tells you that a conflict exists. This advanced version tells you which other shift the worker is already assigned to โ so you can resolve it immediately without scrolling.
=IFERROR(
IF(COUNTIFS($A$2:$A$200, A2, $C$2:$C$200, C2) > 1,
"โ Also on: " & INDEX($B$2:$B$200,
MATCH(A2 & C2, $A$2:$A$200 & $C$2:$C$200, 0)),
"โ OK"),
"โ"){ } curly braces. In Excel 365 or Excel 2021+, you can just press Enter normally.What the INDEX/MATCH addition does:
A2 & C2Concatenates the date and worker name into a single lookup key, e.g. '44026Rodriguez, M'. This lets MATCH search for a combined match.$A$2:$A$200 & $C$2:$C$200Builds the same combined key for every row in the range. MATCH finds the first row where both date and name match.INDEX($B$2:$B$200, โฆ)Returns the shift name from column B at the matched row โ so you see exactly which shift is the other booking.
With this formula, a flagged row will now show: โ Also on: Morningโ telling you Rodriguez is already on Morning shift that day, and you're about to double-book her on Afternoon.
Add Conditional Formatting to Highlight Entire Rows
The formula does the detection. Conditional formatting makes conflicts impossible to miss โ the entire row turns red the moment a conflict is flagged.
- Select your entire data range โ e.g.
A2:D200 - Go to Home โ Conditional Formatting โ New Rule
- Choose "Use a formula to determine which cells to format"
- Enter this formula:
The=$D2="โ DOUBLE-BOOKED"$D2locks column D but lets the row number change โ so every row checks its own D column. - Click Format, choose a red fill, click OK.
Now any row where column D contains the conflict flag will turn red across all four columns โ instantly visible even when you're scrolling fast.
Here's what your schedule looks like before and after applying the formula. The conflict rows (2 and 4 โ Rodriguez on 7/14) are immediately surfaced.
| A | B | C | D |
|---|---|---|---|
| Date | Shift | Worker | Conflict Alert |
| 7/14/2026 | Morning | Rodriguez, M | โ DOUBLE-BOOKED |
| 7/14/2026 | Afternoon | Chen, L | โ OK |
| 7/14/2026 | Morning | Rodriguez, M | โ DOUBLE-BOOKED |
| 7/14/2026 | Night | Torres, J | โ OK |
| 7/15/2026 | Morning | Chen, L | โ OK |
| 7/15/2026 | Afternoon | Rodriguez, M | โ OK |
Both rows flagging Rodriguez on 7/14 are now visible without any scrolling or manual scan. You can sort by column D to push all conflicts to the top before posting the schedule.
Basic version (D2, copy down):
=IFERROR(IF(COUNTIFS($A$2:$A$200,A2,$C$2:$C$200,C2)>1,"โ DOUBLE-BOOKED","โ OK"),"โ")Advanced version (Ctrl+Shift+Enter):
=IFERROR(
IF(COUNTIFS($A$2:$A$200, A2, $C$2:$C$200, C2) > 1,
"โ Also on: " & INDEX($B$2:$B$200,
MATCH(A2 & C2, $A$2:$A$200 & $C$2:$C$200, 0)),
"โ OK"),
"โ")Conditional formatting formula:
=$D2="โ DOUBLE-BOOKED"Problem: Formula returns 0 or always shows โ OK even with obvious duplicates
Fix: Your worker names probably have trailing spaces. Add TRIM: change C2 to TRIM(C2) and $C$2:$C$200 โ unfortunately COUNTIFS doesn't accept TRIM inside it. Instead, add a helper column E with =TRIM(C2) and run COUNTIFS against that column.
Problem: The array formula doesn't work (returns #VALUE!)
Fix: Make sure you pressed Ctrl+Shift+Enter, not just Enter. In older Excel versions the formula MUST be confirmed as an array formula. In Excel 365 this is automatic.
Problem: Conditional formatting highlights wrong rows
Fix: Check that your formula uses $D2 (column locked, row unlocked) and that you applied it starting from A2, not A1. If your header row is row 1, the formula row reference must start at row 2.
ยฉ 2026 ShiftIQ ยท Excel micro-courses for plant managers ยท Back to home