XL AI Automation
Home › Guides › How to remove duplicates in Excel

How to remove duplicates in Excel

5 min read · Updated 4 December 2026

Duplicate invoices, customers listed twice, the same employee in two branch files: duplicates inflate totals and make reports wrong.

Step 1: Look before you delete

Select the column (for example Invoice No) and use Home → Conditional Formatting → Highlight Cells Rules → Duplicate Values. Now you can see what will be removed.

Step 2: Remove Duplicates

  1. Click inside the data and choose Data → Remove Duplicates.
  2. Tick only the columns that define a duplicate. For invoices, that is usually just Invoice No. Ticking every column only removes rows that are identical in every cell.
  3. Click OK. Excel keeps the first row of each group and tells you how many were removed.

This permanently deletes rows, so work on a copy.

Or keep the original with UNIQUE (Microsoft 365)

=UNIQUE(A2:H500) returns the list without duplicate rows in a new place, and updates when the data changes.

Why some duplicates are missed

  • Extra spaces: "MUM/1003" and "MUM/1003 " are different to Excel. Clean with =TRIM(A2) first.
  • Numbers stored as text: 1003 (number) and "1003" (text) don't match.
  • Upper and lower case: Remove Duplicates ignores case, but lookups and some tools don't.