The fastest way to remove duplicates in Excel
Excel has a built-in tool called Remove Duplicates that finds and deletes duplicate rows in seconds. Select your data, go to the Data tab, click Remove Duplicates, choose which columns to check, and click OK. Excel then deletes every row that matches another row in those columns, keeping only the first occurrence of each entry.
This works best when your data is clean — no extra spaces, consistent formatting, and all the information you want to compare is in columns you've selected. If your spreadsheet has headers (a row of column names at the top), tell Excel to treat the first row as headers before you start, so it doesn't accidentally delete your column names.
The tool is permanent and fast, but it gives you no chance to review what gets deleted before it happens. If you want to see duplicates before removing them, or if you need more control over which rows stay and which go, use one of the other methods below.
Key Takeaways
- The Remove Duplicates tool on the Data tab deletes matching rows instantly, but the deletion cannot be undone after you close the file.
- You must select your data first, and you choose which columns Excel should use to decide if a row is a duplicate.
- Conditional formatting with the Highlight Duplicates rule lets you see duplicates in color before you decide what to delete.
- The Advanced Filter method copies only unique rows to a new location, leaving your original data untouched.
- Sorting your data by the columns you care about makes it easier to spot duplicates by eye and delete them manually if you have only a few.
How to use Remove Duplicates step by step
Start by selecting all the data you want to check for duplicates. Click the cell in the top-left corner of your data, then hold Shift and click the cell in the bottom-right corner. If your data has a header row (column names), include it in your selection.
Go to the Data tab at the top of the ribbon. Look for the Remove Duplicates button — it is usually in the Data Tools group. Click it, and a dialog box will open showing all your columns with checkboxes next to each one.
Check the box next to My data has headers if your first row contains column names. Then, in the list of columns, uncheck any columns you do not want Excel to use when deciding if a row is a duplicate. For example, if you have names in column A and phone numbers in column B, and you only want to find people with the same name, uncheck column B. Excel will then delete rows only if the name matches, even if the phone number is different.
Click OK. Excel counts how many duplicate rows it found and deleted, then shows you a message. The duplicates are now gone. If you made a mistake, press Ctrl+Z immediately to undo, but once you close the file, the undo history is lost.
Highlight duplicates with conditional formatting instead of deleting them
If you want to see which rows are duplicates before you delete anything, use Conditional Formatting to color them. Select your data, go to the Home tab, click Conditional Formatting, then choose Highlight Cell Rules and Duplicate Values.
A dialog box opens. Leave the first dropdown set to Duplicate, and choose a color from the second dropdown — red is the default. Click OK. Every cell that appears more than once in your selection will now be highlighted in that color.
This method shows you the duplicates but does not delete them. You can then sort by the highlighted color, review the rows, and delete the ones you do not want by hand. This takes longer but gives you full control and a chance to catch mistakes before data is gone.
Copy only unique rows to a new location with Advanced Filter
The Advanced Filter method is slower than Remove Duplicates but safer because it leaves your original data alone. It copies only the unique rows (rows with no match) to a new location you choose.
Select all your data including headers. Go to the Data tab and click Advanced Filter (it may be under a Sort & Filter menu depending on your Excel version). A dialog box opens with two options: Filter in place and Copy to another location. Choose Copy to another location.
In the Copy to field, click a cell in an empty area of your spreadsheet where you want the unique rows to appear. Check the box next to No duplicates. Click OK. Excel copies every row that has no match to the new location, leaving your original data untouched. You can then delete the original data if you are satisfied with the copy, or keep both for comparison.
Sort and delete duplicates manually for small datasets
If you have only a few dozen rows, sorting your data and deleting duplicates by hand may be faster and safer than using a tool. Select your data, go to the Data tab, and click Sort. Sort by the column that contains the information you want to check for duplicates — usually a name or ID number.
After sorting, identical entries will sit next to each other. Scroll through and look for rows that match the row above them. Click the row number on the left side to select the entire row, then right-click and choose Delete. Repeat for each duplicate you find.
This method is slow for large datasets but gives you complete visibility into what you are deleting. You can also use this approach to delete only some duplicates — for example, keeping the most recent entry and deleting older ones — which the automated tools cannot do.
What to do if Remove Duplicates deleted the wrong rows
If you used Remove Duplicates and it deleted rows you wanted to keep, press Ctrl+Z immediately to undo. The deleted rows will come back. Then try again, but this time uncheck the columns that should not be used to find duplicates.
For example, if you have a list of customers with names, addresses, and order dates, and two customers have the same name but different addresses, Remove Duplicates will treat them as duplicates if you check only the name column. Uncheck the address column, or add it to the comparison, so Excel knows they are different people.
If you have already closed the file, the undo history is gone and the deletion cannot be reversed. This is why the Conditional Formatting or Advanced Filter methods are safer for important data — they let you see what will be removed before it happens.
Handling duplicates across multiple sheets
The built-in Remove Duplicates tool works only on data within a single sheet. If your duplicates are spread across multiple sheets, you have two options: combine the sheets first, or check each sheet separately.
To combine sheets, create a new blank sheet. In the first sheet, select all your data, copy it, go to the new sheet, and paste it. Repeat for each sheet you want to include. Then use Remove Duplicates on the combined data. Afterward, you can delete the original sheets if you no longer need them.
Alternatively, use Remove Duplicates on each sheet one at a time. This is slower but keeps your original sheets intact. Choose whichever approach fits your workflow.
Frequently Asked Questions
Can I undo Remove Duplicates after I close the file?
No. Once you close the file, the undo history is erased and you cannot recover deleted rows. Always save a backup copy of important data before using Remove Duplicates, or use Conditional Formatting or Advanced Filter first to see what will be deleted.
What counts as a duplicate in Excel?
A duplicate is a row where every value in the columns you selected matches another row exactly. If you select columns A and B, and two rows have the same value in A but different values in B, they are not duplicates. Case does not matter — "John" and "john" are treated as the same.
Does Remove Duplicates keep the first or last occurrence of a duplicate?
It keeps the first occurrence (the row that appears earliest in your data) and deletes all later matches. If you need to keep a different row, sort your data first so the row you want to keep appears first.
Can I remove duplicates based on only one column?
Yes. In the Remove Duplicates dialog, uncheck all columns except the one you want to use. Excel will then delete any row where that column matches another row, regardless of what is in the other columns.
What if my data has blank cells?
Blank cells are treated as values. If two rows both have a blank cell in the same column, and all other selected columns match, they will be considered duplicates. If you have many blank cells, clean your data first or use Conditional Formatting to review what will be deleted.