Count How Many Times Each Value Appears
You suspect a list has duplicate entries — the same email, invoice number, or employee ID entered more than once — and you want to see exactly which values repeat and how often.
Excel & Google Sheets
This formula works in both Excel and Google Sheets.
How it works
COUNTIF(A:A,A2) counts how many cells in column A contain the same value as A2. Copy it down and every row shows its own occurrence count: a 1 means the value is unique, and anything greater than 1 means it's a duplicate. Every copy of a duplicate shows the same count — three copies of the same email all show 3. To turn the number into a plain label, wrap it in IF: =IF(COUNTIF(A:A,A2)>1,"Duplicate","Unique"). The comparison ignores case, so ANA@CO.COM and ana@co.com count as the same value.
When to use it
Use this before deduplicating any list you care about: invoice registers, email lists, employee IDs, order numbers. Seeing the counts first tells you how bad the problem is and which values to investigate before deleting anything.
Common mistakes
Did this formula help?
Engine-verified against the sample data aboveLast reviewed 2026-07-08