Direct Answer: Count How Many Times a Value Appears in a Column
Use COUNTIF with a locked range ($A$2:$A$100) to count how often a value in cell A2 occurs across your list. Any count greater than 1 means the value is a duplicate:
=COUNTIF($A$2:$A$100, A2)
Worked Example: Flagging Duplicate Invoice IDs
To label every row that appears more than once as "Duplicate" and unique entries as "Unique", combine IF and COUNTIF:
=IF(COUNTIF($A$2:$A$100, A2)>1, "Duplicate", "Unique")
| Col A (Invoice ID) | =COUNTIF($A$2:$A$4, A2) |
=IF(COUNTIF($A$2:$A$4, A2)>1, "Duplicate", "Unique") |
|---|---|---|
| INV-1001 | 2 | Duplicate (appears twice) |
| INV-1002 | 1 | Unique |
| INV-1001 | 2 | Duplicate (appears twice) |
Flagging Only Repeat Rows (Keeping First Occurrence Clean)
If you want to leave the first appearance untouched and mark only second-and-later repeats as "Repeat", use an expanding range reference ($A$2:A2):
=IF(COUNTIF($A$2:A2, A2)>1, "Repeat", "First")
Tips to Prevent False Duplicate Results
- Clean extra spaces first: A trailing space can make
"INV-1001 "look different from"INV-1001"; clean text using our TRIM & PROPER Guide. - Need only unique entries in a new column? Use UNIQUE to extract distinct values automatically.