The fastest way to delete duplicates in Excel
Excel has a built-in tool called Remove Duplicates that deletes duplicate rows in seconds. Select the data range you want to check, go to the Data tab, click Remove Duplicates, choose which columns to compare, and click OK. Excel then deletes every row that matches another row in those columns and tells you how many rows it removed.
This method works on the entire row or specific columns. If you select three columns, Excel removes rows where all three columns match another row. If you select one column, it removes rows where only that column matches. The tool is permanent — deleted rows do not go to a recycle bin — so save a backup copy first if you are unsure.
The Remove Duplicates tool works in Excel for Windows and Mac, and in Excel Online through a browser. Google Sheets has a similar feature called Remove duplicates under the Data menu, though the steps differ slightly.
Key Takeaways
- The Remove Duplicates tool in the Data tab deletes entire rows where selected columns match, and you choose which columns to compare.
- Deleting duplicates is permanent, so save your file or make a copy before running the tool.
- You can also use filtering or formulas to find duplicates without deleting them, which is safer if you need to review what will be removed first.
- Excel keeps the first occurrence of each duplicate and removes the rest, so the row that stays depends on sort order.
Step-by-step: Using Remove Duplicates in Excel for Windows
Start by selecting all the data you want to check, including headers. Click the first cell in the top-left corner of your data, then hold Shift and click the last cell in the bottom-right corner. Or click the first cell and press Ctrl+Shift+End to select to the end of the data.
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 on the right side of the ribbon. Click it. A dialog box opens showing all the columns in your selection. Check the boxes next to the columns you want Excel to compare. If your data has headers, make sure the My data has headers checkbox is checked so Excel does not treat the header row as data. Click OK.
Excel removes the duplicate rows and shows a message saying how many rows were deleted and how many remain. Click OK to close the message. Your data now contains only unique rows based on the columns you selected.
How to use Remove Duplicates in Excel for Mac
The Mac version works the same way, but the ribbon layout is slightly different. Select your data range, then click the Data tab. Look for Remove Duplicates in the Data Tools section. If you do not see it, click the Data menu at the top and look for Remove Duplicates there instead.
The dialog box that opens is identical to the Windows version. Choose which columns to compare, confirm your headers setting, and click OK. The duplicates are removed the same way.
Finding duplicates without deleting them first
If you want to see which rows are duplicates before you delete them, use conditional formatting or a helper column instead of Remove Duplicates. This is safer because you can review the results and undo if something looks wrong.
To use conditional formatting, select your data range, go to Home tab, click Conditional Formatting, then Highlight Cell Rules, then Duplicate Values. Excel highlights every duplicate value in the selected column with a color. You can then manually delete the rows you want to remove, or use this view to understand what the Remove Duplicates tool will do before you run it.
To use a helper column, add a new column next to your data and use the COUNTIF function. In the first data row of the new column, type =COUNTIF($A$2:A2,A2) (adjust the column letter to match your first data column). Copy this formula down to every row. Cells that show "1" appear only once; cells that show "2" or higher are duplicates. You can then filter or sort by this column to see and delete duplicates manually.
What happens when you delete duplicates
Excel keeps the first occurrence of each duplicate and removes all the others. If you have three rows with the same data, Excel keeps the first one and deletes rows two and three. The "first" row depends on the sort order of your data — if your data is sorted by date, the earliest date is kept and later duplicates are removed.
The Remove Duplicates tool compares only the columns you selected. If you select columns A and B, Excel removes rows where both A and B match, even if column C is different. If you select all columns, Excel removes rows only if every single column matches.
Removing duplicates from a single column
If you want to remove duplicate values from just one column — for example, a list of email addresses — select only that column before opening Remove Duplicates. Click the column header to select the entire column, or select just the data range in that column. Open the Remove Duplicates dialog, make sure only that column is checked, and click OK.
Keep in mind that this removes entire rows, not just the values in that column. If you have a list of names in column A and email addresses in column B, and you remove duplicates based on column A only, you will delete entire rows where the name repeats — both the name and the email address in that row will be gone.
Undoing a Remove Duplicates action
If you run Remove Duplicates and realize you made a mistake, press Ctrl+Z immediately to undo. This restores all the rows that were deleted. You can undo as long as you have not saved the file and closed it.
Once you save and close the file, you cannot undo the deletion. This is why saving a backup copy before removing duplicates is important. If something goes wrong, you still have the original file with all the data intact.
Frequently Asked Questions
Can I remove duplicates based on multiple columns?
Yes. In the Remove Duplicates dialog, check the boxes next to every column you want Excel to compare. Excel then removes rows only when all the selected columns match another row. For example, if you check columns A, B, and C, a row is deleted only if another row has the same values in all three columns.
Does Remove Duplicates work in Excel Online?
Yes, but the feature is called Remove duplicates and is located under the Data menu. Select your data, click Data, then Remove duplicates. The dialog and process are the same as the desktop version.
What if I only want to delete duplicate values in one cell, not the entire row?
The Remove Duplicates tool always deletes entire rows. If you want to delete only the duplicate value and keep the rest of the row, you will need to manually edit the cell or use a formula to identify which cells are duplicates, then delete them one at a time.
Can I see which rows will be deleted before I confirm?
No, the Remove Duplicates tool does not show a preview. Use conditional formatting or a helper column first to highlight duplicates and review them before you delete. This way you can see exactly what will be removed and undo if needed.
Does the order of my data matter when removing duplicates?
Yes. Excel keeps the first occurrence of each duplicate based on the current sort order. If your data is sorted by date, the earliest date is kept. If you sort differently before removing duplicates, different rows will be kept. Sort your data the way you want it before running Remove Duplicates if the order matters.