
To remove duplicates in Excel you can use the built-in Remove Duplicates tool, the UNIQUE function or a helper formula that flags repeated rows first. Each method fits a different job, and one of them changes your data while the others do not. This guide walks through all three with made-up data, shows how to highlight duplicates before you delete anything and explains the mistakes that cost people data.
Back up the data first
The Remove Duplicates tool deletes rows and you cannot tell afterwards which ones went, except with Undo. Copy the sheet or the range to a new place before you start.

Method 1: the Remove Duplicates tool
- Click any cell inside your data.
- Go to the Data tab and click Remove Duplicates.
- Tick My data has headers if the first row holds titles.
- Tick the columns Excel should compare.
- Click OK. Excel tells you how many duplicate values were removed and how many unique values remain.
Excel keeps the first row of each group and deletes the later ones. If you tick only the Email column, two rows with the same email count as duplicates even when the names differ. If you tick every column, a row is a duplicate only when all columns match.

Method 2: the UNIQUE function
In Excel for Microsoft 365 and Excel 2021 or later, UNIQUE returns a list without duplicates and leaves your source data alone:
=UNIQUE(A2:A100)
For a table with several columns use =UNIQUE(A2:C100). The result spills into the cells below, so keep them empty. UNIQUE is not available in Excel 2019 or older. The same function exists in Google Sheets, and we cover it in UNIQUE function examples.

Method 3: flag duplicates with COUNTIF
If you want to review duplicates before deleting, add a helper column. In B2:
=IF(COUNTIF($A$2:A2, A2) > 1, "Duplicate", "")
Fill it down. Because the range grows as you copy the formula, the first appearance of a value stays blank and the later ones say Duplicate. Filter the column for Duplicate to see exactly what would be removed.

Highlight duplicates with conditional formatting
- Select the column.
- On the Home tab click Conditional Formatting, then Highlight Cells Rules, then Duplicate Values.
- Pick a color and click OK.
This colors every cell whose value appears more than once, including the first one. It is the quickest way to look before you act.
Remove duplicates that differ by spaces or case
Excel's tool treats "Sara" and "Sara " as different values because of the trailing space. Clean the column first. Put =TRIM(A2) in a helper column, copy the results and paste them as values, then run Remove Duplicates on the clean column. The tool is not case sensitive, so "sara" and "SARA" count as the same.
Count how many duplicates you have
To count the rows that are repeats, count the flagged cells:
=COUNTIF(B2:B100, "Duplicate")
See COUNTIFS with multiple criteria if you need to count with more than one condition.
Common mistakes
- Wrong columns ticked. Ticking too few columns removes rows that are not real duplicates.
- Hidden or filtered rows. Test on a copy and check the result count.
- Formulas in the range. The tool compares displayed values, so results from formulas can behave in ways you do not expect. Paste them as values first.
- No backup. Close the file by mistake and the removed rows are gone.
Questions and answers
How do I remove duplicates in Google Sheets?
Google Sheets has its own tool under the Data menu. Read how to remove duplicates in Google Sheets.
Does Excel keep the first or the last duplicate?
The first one stays. Sort your data first if you want a specific row to survive, for example the newest date at the top.
Can I undo Remove Duplicates?
Yes, with Ctrl+Z straight after, but not after you close the file without saving a copy.
How do I find duplicates without deleting them?
Use the conditional formatting rule or the COUNTIF helper column.
Summary
Use the tool for a quick clean-up, UNIQUE when you want a separate list, and a COUNTIF flag when you need to review first. Trim the text and back up the data before you remove anything.
