Formula Fixer

How to Remove or Highlight Duplicates in Excel and Google Sheets

Updated 2026-11-03

Excel

Google Sheets

Formula that keeps the original

=UNIQUE(A2:A500)

UNIQUE works in Microsoft 365, Excel 2021 and Google Sheets and updates automatically.

Count how many times each value appears

=COUNTIF($A$2:$A$500, A2)

Tip: copy your data to a new sheet before removing duplicates, because Remove Duplicates deletes rows permanently once saved.

← More guides