Skip to main content

Cleanup formula page

Find Duplicates Formula

Use this when you want a separate list of values that appear more than once.

Best for

Find duplicate values with a formula.

What it returns

With the sample data, maya@example.com appears in the duplicate list.

Copy formulas

Excel formula
=UNIQUE(FILTER(A2:A100, (A2:A100<>"")*(COUNTIF(A2:A100, A2:A100)>1)))
Google Sheets formula
=IFERROR(UNIQUE(FILTER(A2:A100, (A2:A100<>"")*(COUNTIF(A2:A100, A2:A100)>1))), "No duplicates")
Excel / Google Sheets difference

Both formulas exclude blanks before UNIQUE returns duplicated values; Google Sheets adds IFERROR so an all-distinct range can show No duplicates instead of an error.

Example data

EmailRegionStatus
maya@example.comEastActive
noah@example.comWestActive
maya@example.comEastActive
WestInactive
What it returns

With the sample data, maya@example.com appears in the duplicate list.

How the formula works

  • The nonblank condition excludes unused rows.
  • COUNTIF checks how many times each remaining value appears.
  • UNIQUE returns each duplicate value once.
Syntax pieceRole in the formula
COUNTIF(A2:A100,A2:A100)The frequency calculation for every source value.
>1The FILTER condition that keeps values occurring more than once.
A2:A100<>""The condition that excludes blank and unused rows.
UNIQUEThe function that lists each duplicated value once.

Verified examples

Sample duplicate value
=UNIQUE(FILTER(A2:A100, (A2:A100<>"")*(COUNTIF(A2:A100, A2:A100)>1)))

Excel: Use the sample email column where maya@example.com occurs more than once and later rows are blank. Returns: maya@example.com once

No duplicates fallback
=IFERROR(UNIQUE(FILTER(A2:A100, (A2:A100<>"")*(COUNTIF(A2:A100, A2:A100)>1))), "No duplicates")

Google Sheets: Enter A, B, and C once each in A2:A4 and leave the rest of A2:A100 blank. Returns: No duplicates

Three repeated values
=UNIQUE(FILTER(A2:A100, (A2:A100<>"")*(COUNTIF(A2:A100, A2:A100)>1)))

Excel: Enter A, A, A, and B in A2:A5 and leave the rest of A2:A100 blank. Returns: A once

Common errors and fixes

IssueLikely causeFix
Excel returns #CALC! when every value is distinctFILTER has no matching duplicate rows.Wrap the formula with IFERROR or add an if-empty result when a text fallback is required.
Apparent duplicates are separateValues differ by hidden spaces or other invisible characters.Clean the source with TRIM or a helper column before counting.
The result shows a spill errorCells below the formula already contain values.Clear the spill area or move the formula to an empty column.

When not to use this formula

  • Do not use this formula to label each source row; use a row-level duplicate flag for that workflow.

Alternatives

AlternativeWhen to use it
Flag Duplicate Values FormulaUse when every duplicated source row needs a Duplicate label.
Duplicate Checker Formula BuilderUse when duplicate criteria and labels need interactive configuration.

Related formulas

Official references

FAQ

Is each duplicate value listed more than once?

No. UNIQUE returns each value that is duplicated exactly once in the result.

Does this flag source rows?

No. It produces a separate list of duplicated values; use a row-level flag when source rows need labels.