The fastest way to remove duplicates in Excel

Excel has a built-in Remove Duplicates tool that deletes rows where all values match another row exactly. Select the data range (including headers if you have them), go to the Data tab, click Remove Duplicates, confirm which columns to check, and click OK. Excel will delete the duplicate rows and tell you how many it removed.

This method works on the entire row or on specific columns you choose. If you want to keep one copy of each unique entry and remove only the extras, this is the simplest approach. The duplicates are deleted permanently, so if you are unsure, copy your data to a new sheet first.

The tool works the same way in Excel 2016, 2019, 2021, and Excel Online. Older versions like Excel 2010 and 2013 have the feature but it may be in a slightly different menu location.

Key Takeaways

  • The Remove Duplicates button on the Data tab deletes entire rows where all selected columns match another row.
  • You must select your data range first, including headers if present, before opening the Remove Duplicates dialog.
  • You can choose which columns to check for duplicates — Excel does not have to compare every column.
  • Duplicates are deleted immediately and cannot be undone with a simple undo if you close the file, so test on a copy first if you are uncertain.

How to use the Remove Duplicates tool step by step

Start by selecting all the data you want to check. Click the first cell of your data, then drag to the last cell, or click the first cell and press Ctrl+Shift+End to select to the end of your data. Make sure to include the header row if you have one — Excel will ask you to confirm whether the first row contains headers.

Open the Data tab at the top of the ribbon. Look for the Remove Duplicates button. In Excel 2016 and later, it is in the Data Tools group. Click it.

A dialog box will appear showing all the columns in your selection. Each column has a checkbox. By default, all columns are checked. If you want Excel to consider rows as duplicates only when certain columns match (not all of them), uncheck the columns you want to ignore. For example, if you have a list of customers with names and email addresses, you might uncheck the email column and only check the name column to find people with the same name, regardless of email.

Make sure the My data has headers checkbox is correct. If your first row contains column names, check it. If your data starts with actual entries, leave it unchecked. Click OK. Excel will delete the duplicate rows and show you a message saying how many duplicates were removed.

When Remove Duplicates does not work the way you expect

The Remove Duplicates tool compares rows exactly. If one row says "John Smith" and another says "john smith" (different capitalization), Excel treats them as different entries and will not remove either one. The same applies to extra spaces — "John Smith" and "John Smith" (with two spaces) are different to Excel.

If you need to catch these kinds of near-duplicates, clean your data first. Use Find and Replace to standardize capitalization, or use the TRIM function to remove extra spaces. Then run Remove Duplicates again.

The tool also deletes entire rows. If you have data in columns A, B, and C, and rows 2 and 5 are duplicates, the entire row 5 is deleted — not just the duplicate cells. If you need to keep some columns from the duplicate row, you will need a different approach, like sorting and manually reviewing, or using a formula-based method.

Using filters and sorting to find duplicates manually

If you want to see duplicates before deleting them, or if you need more control over which rows to keep, sort and filter instead. Sort your data by the column most likely to contain duplicates. Identical entries will now sit next to each other, and you can scroll through and delete the ones you want to remove manually.

To sort, select your data, go to Data, click Sort, choose the column to sort by, and click OK. Then scroll through and delete duplicate rows one at a time by right-clicking the row number and selecting Delete.

This method takes longer but gives you the chance to decide which copy to keep. For example, if you have two rows for the same customer, you might want to keep the one with the most recent date or the most complete information.

Removing duplicates based on one column only

Sometimes you have a column that should contain unique values — like customer ID numbers or email addresses — and you want to delete rows where that column repeats. Use Remove Duplicates and uncheck all columns except the one you care about.

Select your data, open Data > Remove Duplicates, and uncheck every column except the one you want to check. For example, if you want to keep only the first occurrence of each email address, uncheck all columns except the email column. Click OK.

Excel will delete any row where the email address appears more than once, keeping only the first occurrence. This is useful for cleaning up mailing lists or customer databases where you should have one record per person.

Recovering data after removing duplicates

If you delete duplicates and then realize you made a mistake, press Ctrl+Z immediately to undo. This works as long as you have not closed the file. If you have closed the file, the deletion is permanent and cannot be recovered through Excel.

To be safe, always save a copy of your original data before using Remove Duplicates. You can do this by right-clicking the sheet tab at the bottom, selecting Move or Copy, choosing Create a copy, and clicking OK. Work on the copy, and if something goes wrong, you still have the original.

Frequently Asked Questions

Does Remove Duplicates work on filtered data?

No. Remove Duplicates checks all rows in your selection, including hidden ones. If you have filtered your data to show only certain rows, Remove Duplicates will still delete duplicates in the hidden rows. To delete duplicates only in visible rows, copy the filtered results to a new sheet first, then run Remove Duplicates there.

Can I remove duplicates based on multiple columns but not all columns?

Yes. In the Remove Duplicates dialog, uncheck the columns you do not want to compare. For example, if you have Name, Email, and Phone columns and want to find people with the same name and email (ignoring phone), uncheck the Phone column and keep Name and Email checked.

What happens to the order of my data after removing duplicates?

Remove Duplicates keeps your data in the same order. It deletes entire rows but does not rearrange the remaining rows. If you sorted your data before removing duplicates, it stays sorted after.

Can I undo Remove Duplicates after I close the file?

No. Once you close the file without undoing, the deletion is permanent. Always save a backup copy of your data before using Remove Duplicates, or use Ctrl+Z immediately if you change your mind.