How to find duplicates in a column in Excel
Formula (Excel and Google Sheets)
=IF(COUNTIF($A$2:$A$10,A2)>1,"Duplicate","")Count each value in the whole column: =IF(COUNTIF($A$2:$A$10,A2)>1,"Duplicate",""). Any value that appears more than once is flagged.
- Result on the example
- one result per row in
B2, filled down toB10 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in B2, filled down to B10. Change any input and the result updates, or edit the formula to experiment.
How it works
COUNTIF counts how many times the email in this row appears in the whole list. The list is locked with $ so it stays the same as you fill down, while A2 moves to each row. More than one means the email is repeated, and every copy gets flagged.
=IF(COUNTIF($A$2:$A$10,A2)>1,"Duplicate","")Result"Duplicate"
$A$2:$A$109 rows × 1 col: "ana@northwind.example", "ben@contoso.example", "cara@fabrikam.example", "ana@northwind.example", …A range: 9 cells in one column.
A2"ana@northwind.example"The value in A2.
COUNTIF($A$2:$A$10,A2)3COUNTIF: Counts cells that meet one condition.- range
$A$2:$A$109 rows × 1 col: "ana@northwind.example", "ben@contoso.example", "cara@fabrikam.example", "ana@northwind.example", … - criteria
A2"ana@northwind.example"
- range
COUNTIF($A$2:$A$10,A2)>1TRUEThe > operator tests greater than.
IF(COUNTIF($A$2:$A$10,A2)>1,"Duplicate","")"Duplicate"IF: Returns one value if a test is true, another if false.- logical_test
COUNTIF($A$2:$A$10,A2)>1TRUE - value_if_true
"Duplicate" - value_if_false
""not used
- logical_test
In Google Sheets
The same formula works in Google Sheets: =IF(COUNTIF($A$2:$A$10,A2)>1,"Duplicate",""). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =COUNTIF($A$2:$A$10,A2)>1 | TRUE, TRUE, FALSE…Different result | Returns TRUE or FALSE, which you can filter on or use in conditional formatting. TRUE and FALSE instead of labels. |
Common mistakes
- Without $ the range shrinks as you fill down, and later duplicates are missed.
- COUNTIF ignores case and treats "ana@…" and "ANA@…" as the same. Extra spaces make them different; TRIM first.
- COUNTIF with text longer than 255 characters returns #VALUE!. Use SUMPRODUCT(--(range=A2)) for long text.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Find duplicates in a column
B2, show "Duplicate" when the email appears more than once in A2:A10, otherwise leave it blank. Fill down to B10.Questions
How do I highlight duplicates instead?
Use the test as a conditional formatting rule: =COUNTIF($A$2:$A$10,A2)>1.
How do I flag only the second and later copies?
Count from the top to the current row: =IF(COUNTIF($A$2:A2,A2)>1,"Repeat","").
Checked by running on 2026-10-29: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.