Find & Count Duplicate Values in Excel & Google Sheets (COUNTIF)

Spot duplicate IDs, emails, or invoice numbers fast, count how many times each entry appears, and flag repeat rows cleanly.

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

Editorial & Accuracy Note: Tested across Microsoft Excel and Google Sheets with worked sample inputs and outputs. Part of the Know Unlimited Excel & Google Sheets Hub.