How to remove duplicates in Excel (four ways, and the traps)
Remove Duplicates is one click, but it deletes rows for good and misses near-duplicates. Four methods, when to use each, and how to catch the duplicates Excel does not see.

There are four good ways to deal with duplicates in Excel, and which one you want depends on whether you want to delete them, list unique values, or just see them first. If you would rather not touch the original at all, the Remove Duplicates tool writes a clean copy plus an audit sheet of what was removed, in your browser.
Before you start: save a copy
The built-in Remove Duplicates deletes rows. Undo works straight afterwards, but not once you have saved and closed the file. Duplicate the sheet first (right-click the tab → Move or Copy → Create a copy) if the data matters.
Method 1: the Remove Duplicates button
- Click any cell in your data.
- Go to Data → Remove Duplicates.
- Tick the columns that define a duplicate. Untick the rest.
- Press OK. Excel reports how many duplicates were removed and how many unique values remain.
The column choice is the important part. With every column ticked, two rows count as duplicates only if they match in every column. Tick only Email, and Excel keeps the first row for each email address and deletes the later ones, even if their other columns differ.
What it keeps: the first occurrence, from the top. If you want to keep the most recent record instead, sort by date newest-first before removing duplicates.
Method 2: the UNIQUE function (Microsoft 365 and Excel 2021+)
To get a list of distinct values without changing the source:
=UNIQUE(A2:A500)The result spills down as far as needed and updates when the source changes. Useful variations:
=SORT(UNIQUE(A2:A500))
=UNIQUE(A2:C500)
=UNIQUE(A2:A500,,TRUE)The second returns unique combinations of three columns; the third returns only the values that appear exactly once.
Method 3: highlight duplicates first
When you want to look before deleting:
- Select the column.
- Home → Conditional Formatting → Highlight Cells Rules → Duplicate Values.
- Pick a colour and press OK.
Then filter by colour (Data → Filter, then the header’s Filter by Color) to see all the duplicates together.
Method 4: a COUNTIF helper column
For full control, add a column that counts how many times each value appears:
=COUNTIF($A$2:$A$500, A2)Anything above 1 is a duplicate. To flag only the second and later copies, so the first can be kept:
=COUNTIF($A$2:A2, A2)>1Note the anchoring: the range starts fixed at $A$2 and grows as the formula is filled down. Filter the helper column for TRUE and delete those rows. The COUNTIF Generator writes these with the right quotes and anchors.
The duplicates Excel does not see
Every method above compares values exactly, apart from letter case. So these all look like different values to Excel, and survive:
- Trailing or double spaces: "Acme Ltd" and "Acme Ltd " (with a space at the end).
- Non-breaking spaces copied from web pages, which look identical to normal spaces.
- Numbers stored as text next to real numbers: 1001 and "1001".
- Different punctuation: "Acme Ltd" and "Acme Ltd."
Fix them before removing duplicates. A helper column with =TRIM(CLEAN(A2)) handles spaces and invisible characters; the Excel Data Cleaner does this across whole sheets at once, including non-breaking spaces and numbers stored as text.
Case: Remove Duplicates, UNIQUE and COUNTIF all treat "ACME" and "acme" as the same. That is usually what you want. If case matters (product codes, for example), use a helper column with EXACT, or a tool with a case-sensitive option.
Finding duplicates across two lists
To see which customers in list A also appear in list B:
=COUNTIF(Sheet2!$A:$A, A2)>0TRUE means the value exists in the other list. For a fuller comparison of two files, the Duplicate Finder reports every duplicate with its real row numbers.


