Conditional formatting catches duplicates in one column. To find rows that repeat across several columns at once, COUNTIFS is the tool.
Drag down the helper column; every repeated row gets labelled.
The example
An order list where the same customer, date, and amount should never appear twice.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Customer | Date | Amount | Flag |
| 2 | Acme | 06/01 | $200 | |
| 3 | Bolt | 06/02 | $150 | |
| 4 | Acme | 06/01 | $200 | Duplicate |
| 5 | Acme | 06/01 | $200 | Duplicate |
The formula
COUNTIFS counts rows matching all the listed column values at once:
How it works
Why this works:
- COUNTIFS counts rows where column A equals this row's A and column B equals this row's B and column C equals this row's C.
- A unique row matches only itself, so the count is 1.
- A repeated combination matches 2 or more rows, so the count is greater than 1.
- IF turns any count above 1 into the word "Duplicate"; otherwise it leaves the cell blank.
Use absolute ranges ($A$2:$A$5) so the formula keeps the same window as you fill it down.
Try it: interactive demo
Set how many times a row's combination appears. Anything above 1 is flagged.
Variations
Mark only the second-and-later copies
Keep the first occurrence and flag the rest by counting from the top of the list only.
Count how many true duplicate rows exist
Wrap the helper column in COUNTIF, or use SUMPRODUCT on the flag.
Pitfalls & errors
Trailing spaces and different capitalisation break the match. Run TRIM and consider UPPER on text columns first.
COUNTIFS treats the displayed value, so 200 and $200 stored as text can mismatch a numeric 200. Keep column types consistent.
Practice workbook
Frequently asked questions
How many columns can COUNTIFS compare?
Can I highlight the rows instead of labelling them?
Why are identical-looking rows not flagged?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class