The fastest way to remove duplicates in Excel

Excel has a built-in Remove Duplicates tool that deletes duplicate rows in seconds. Select the column or range containing duplicates, go to the Data tab, click Remove Duplicates, confirm which columns to check, and click Remove Duplicates again. Excel will delete every row that matches an earlier row in the selected columns and tell you how many rows it removed.

This method works on the entire row, not just the column you see. If you have data in columns A, B, and C, and rows 2 and 5 are identical across all three columns, Excel will delete row 5 entirely — not just the duplicate value in one column. That is usually what you want, but it matters if your spreadsheet has other data you need to keep.

If you only want to remove duplicates from a single column while keeping the rest of the row intact, you will need a different approach. The Remove Duplicates tool is not the right choice for that situation.

Key Takeaways

  • The Remove Duplicates tool on the Data tab deletes entire rows that match earlier rows, not just duplicate values in one column.
  • You must select your data range before opening Remove Duplicates, and you can choose which columns Excel should check for matches.
  • If you want to keep rows but just flag or hide duplicates, use conditional formatting or a helper column instead of deleting them.
  • Always make a backup copy of your spreadsheet before removing duplicates, because the deletion cannot be undone with Undo if you close the file.

Step-by-step: Using the Remove Duplicates tool

Start by selecting the data range that contains duplicates. Click the first cell with data, then drag to the last cell, or click the first cell and hold Shift while clicking the last cell. Include the header row if your data has one — Excel will recognize it and not treat the header as a duplicate.

Open the Data tab at the top of the ribbon. Look for the Remove Duplicates button. In Excel for Windows, it is usually in the Data Tools group. In Excel for Mac, it may be under Data > Filter > Remove Duplicates or in a similar location depending on your version.

A dialog box will appear listing all the columns in your selection. By default, all columns are checked. This means Excel will consider a row a duplicate only if every checked column matches a previous row. If you want Excel to check only certain columns, uncheck the others. For example, if you want to remove rows where the name and email match but ignore the phone number, uncheck the phone column.

Click Remove Duplicates in the dialog. Excel will process the data and show you a message saying how many duplicate rows were deleted. Click OK to close the message. Your spreadsheet now contains only unique rows based on the columns you selected.

When Remove Duplicates is not the right tool

The Remove Duplicates tool deletes rows permanently and immediately. If you close the file without saving, you can undo the deletion. But if you save the file after removing duplicates, those rows are gone for good. Before you use this tool on important data, save a copy of the original file.

If you want to keep the duplicate rows but just identify them, use conditional formatting instead. Select your data range, go to Home > Conditional Formatting > Highlight Cell Rules > Duplicate Values. Excel will color every duplicate cell so you can see them without deleting anything. You can then decide which rows to remove manually.

If you need to remove duplicates from only one column while keeping the rest of the row, a helper column works better. In a blank column next to your data, use the formula =COUNTIF($A$2:A2,A2) (replacing A with your column letter). Copy this formula down. Cells with a value of 1 are unique; cells with 2 or higher are duplicates. Then you can filter or sort by this column and delete only the rows you want.

Removing duplicates while keeping one copy of each value

The Remove Duplicates tool keeps the first occurrence of each value and deletes all later copies. If your data is sorted in a way that matters — for example, by date, with the newest entries first — the rows that remain might not be the ones you want to keep.

If you need to keep a specific copy of each duplicate (such as the most recent entry), sort your data by the column that matters first. Put the rows you want to keep at the top, then use Remove Duplicates. Excel will delete the duplicates below and preserve the ones you sorted to the top.

Removing duplicates across multiple columns

If your spreadsheet has many columns and you want to remove duplicates based on only some of them, the Remove Duplicates dialog lets you choose. For example, if you have columns for first name, last name, email, phone, and address, you might want to remove rows where the first name, last name, and email all match — but ignore phone and address because those can change.

In the Remove Duplicates dialog, uncheck the columns you want to ignore. Excel will then consider a row a duplicate only if the checked columns match a previous row. This is useful when you have data from multiple sources and want to deduplicate based on key fields only.

What happens to your data after removing duplicates

After you click Remove Duplicates, Excel shows you a count of how many rows were deleted. The remaining rows stay in their original order — Excel does not sort or rearrange them. The deleted rows are removed from the spreadsheet entirely, and the rows below move up to fill the gap.

If you realize you made a mistake, press Ctrl+Z (or Cmd+Z on Mac) immediately to undo the deletion. This works only if you have not closed the file or performed other actions since the deletion. Once you save the file, the undo history is cleared, and you cannot recover the deleted rows unless you have a backup.

Frequently Asked Questions

Can I undo Remove Duplicates after I save the file?

No. Once you save the file after removing duplicates, the deleted rows cannot be recovered through Excel's undo function. Always save a backup copy of your original data before using Remove Duplicates on important spreadsheets.

Does Remove Duplicates check the entire row or just one column?

It checks the columns you select in the dialog. By default, all columns are checked, so Excel considers a row a duplicate only if every column matches a previous row. You can uncheck specific columns to ignore them.

What if I want to keep duplicates but just see which rows are duplicates?

Use conditional formatting instead. Select your data, go to Home > Conditional Formatting > Highlight Cell Rules > Duplicate Values. Excel will color duplicate cells without deleting anything, letting you review them first.

Can I remove duplicates from only one column without deleting the entire row?

Remove Duplicates deletes entire rows, not individual cells. To keep rows but remove duplicate values from one column, use a helper column with a COUNTIF formula to identify duplicates, then filter and delete manually.

Does the order of my data matter when I remove duplicates?

Yes. Remove Duplicates keeps the first occurrence of each value and deletes later copies. If your data is sorted by date or priority, sort it the way you want before removing duplicates so the rows you want to keep stay at the top.