FormulaCraft

How to flag duplicate values in Excel and Google Sheets

Topic:Duplicates & uniqueness
Excel & Google Sheets
=IF(COUNTIF($A$2:$A$6,A2)>1,"Duplicate","Unique")

Verified example

Computed by a real spreadsheet engine on the sample data below.

ItemStatus
Apple
Banana
Apple
Cherry
Banana

=IF(COUNTIF($A$2:$A$6,A2)>1,"Duplicate","Unique")Duplicate

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1In a helper column (e.g., B2), enter =IF(COUNTIF($A$2:$A$6,A2)>1,"Duplicate","Unique") — lock the range with $ so it doesn't shift when you copy down.
  2. 2Copy the formula down through all rows in your data (e.g., B2:B6).
  3. 3Filter or sort column B to group all 'Duplicate' entries together for easy review or deletion.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

Does the formula catch duplicates that differ only in case?

Yes — COUNTIF is case-insensitive, so 'Apple' and 'apple' are treated as the same value.

Can I flag duplicates across two separate columns?

Yes — change the range to cover both columns, e.g. COUNTIF($A$2:$B$6,A2)>1.

More on Duplicates & uniqueness

See all →

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: