Delete Duplicate Rows in Excel: Fast and Easy Methods
In this article
To quickly delete duplicate rows in Excel, select your data range, go to the Data tab, and click Remove Duplicates. This built-in tool scans your selected columns for identical values and permanently deletes the redundant rows, keeping only the first unique instance of each record. This process is essential for cleaning datasets, ensuring accurate reporting, and preventing double-counting in financial or inventory spreadsheets.
What You'll Need
- A computer with Microsoft Excel installed (works across most modern versions, including Office 365, Excel 2021, 2019, and 2016).
- A dataset organized in a table or a range of cells with clear column headers.
- A backup copy of your file (strongly recommended, as the Remove Duplicates tool permanently deletes data).
Step-by-Step
- Back Up Your Data: Before performing any bulk deletion, save a copy of your workbook or duplicate the worksheet. Because the Remove Duplicates feature does not move data to a separate list but deletes it from the original source, you cannot simply "undo" the action if you realize later that some duplicates were actually unique records with slight variations.
- Select Your Data Range: Click any single cell within your data set. Excel will typically auto-detect the boundaries of your data. Alternatively, you can click and drag to highlight the specific columns and rows you wish to analyze. If your data is already formatted as an official Excel Table (Insert > Table), simply clicking inside the table is sufficient.
- Access the Remove Duplicates Tool: Navigate to the top ribbon menu. Click on the Data tab. In the Data Tools group, locate and click the Remove Duplicates icon. Note that depending on your screen resolution or Excel version, this may appear as a small icon with two columns and a red X.
- Configure the Selection Dialog: A dialog box will appear. First, check the box labeled My data has headers in the top right corner. This ensures Excel treats the first row as labels rather than data, preventing your column names from being deleted if they happen to be duplicates of a data entry.
- Choose Your Criteria: You will see a list of all columns in your selection.
- To delete exact duplicates: Keep all columns checked. Excel will only delete a row if every single cell in that row is identical to another row.
- To delete based on specific identifiers: Uncheck all columns and select only the one that should be unique, such as "Email Address," "Order ID," or "Employee Number." This is useful if you have the same person listed multiple times with different dates, but you only want one entry per person.
- Execute the Deletion: Click OK. Excel will process the list and display a summary message telling you how many duplicate values were found and removed, and how many unique values remain.
- Verify the Results: Scroll through your data or use a filter to ensure that the remaining entries are correct and that no critical information was accidentally purged.
Common Mistakes
One of the most frequent errors is failing to account for trailing spaces. Excel treats "Apple" and "Apple " (with a space at the end) as two different values. If your data was imported from a web form or another software, invisible spaces often prevent the Remove Duplicates tool from identifying true duplicates. To fix this, use the =TRIM() function in a helper column to clean the text before running the tool.
Another common mistake is forgetting to select the entire dataset. If you highlight only one column and run the tool without checking the "Expand the selection" prompt, you risk deleting the data in that specific column while leaving the rest of the row intact. This shifts your data and destroys the integrity of your records, as the information in Row 5 may no longer align with the correct person or ID in Row 5.
Users also often confuse Remove Duplicates with Conditional Formatting. Highlighting duplicates in red using Conditional Formatting only makes them visible; it does not remove them. If you use the highlighting method, you must still manually delete the rows or use a filter to isolate and delete the red cells.
Tips
For those who prefer a non-destructive approach, use the UNIQUE function (available in Excel 365 and Excel 2021). Instead of deleting data, go to a blank cell and type =UNIQUE(A1:C100). This creates a dynamic array that lists only the unique rows from your source range in a new location, leaving your original data untouched.
If you need to find duplicates based on a complex set of rules, try Advanced Filter. Go to Data > Advanced. Select "Copy to another location," choose your list range, and check the box for "Unique records only." This allows you to extract a clean list to a different part of the sheet without modifying the source.
To ensure maximum accuracy, standardize your casing. Excel is generally not case-sensitive when removing duplicates (it treats "USA" and "usa" as the same), but it is good practice to use the =UPPER() or =PROPER() functions to make your data consistent before cleaning.
Troubleshooting
If the tool says "No duplicate values found" but you can clearly see them: This is almost always caused by hidden characters or formatting differences. Check for leading or trailing spaces. You can also check for non-breaking spaces (common in data copied from websites) by using the Find and Replace tool (Ctrl+H) to replace a non-breaking space with a standard space.
If the tool deletes too much data: This happens when you select too few columns in the dialog box. For example, if you only select the "City" column, Excel will delete every row except the first instance of each city, regardless of whether the people living in those cities are different. To fix this, undo the action immediately (Ctrl+Z) and re-run the tool with all relevant columns checked.
If the "Remove Duplicates" button is greyed out: Ensure that you are not currently editing a cell (the cursor should not be blinking inside a cell). Also, check if the worksheet is protected. Go to the Review tab and check if it says "Unprotect Sheet." If the sheet is locked, you cannot modify the data until it is unprotected.
If the data is in a Table and the range isn't updating: Ensure your data is actually formatted as a Table (Ctrl+T). If it is just a range of cells, you must manually update the selection range if you add new rows before running the tool again.
Frequently Asked Questions
Can I remove duplicates based on only one column?
Yes. In the Remove Duplicates dialog box, uncheck all columns except for the one you want Excel to use as the unique identifier. Excel will then delete any row where that specific column has a repeating value.
Does Remove Duplicates delete the first or last occurrence?
Excel always keeps the first occurrence it encounters (the top-most row) and deletes all subsequent duplicates found further down the list.
Is there a way to see which rows will be deleted before I click OK?
The Remove Duplicates tool does not provide a preview. To see duplicates first, use Conditional Formatting > Highlight Cells Rules > Duplicate Values. This will color the duplicates so you can inspect them before deleting.
Can I use a formula to find duplicates instead of the tool?
Yes, you can use the =COUNTIF() function. For example, =COUNTIF($A$2:A2, A2) dragged down a column will mark the first instance as 1 and any subsequent duplicates as 2, 3, and so on. You can then filter for any value greater than 1 and delete those rows.
Does this tool work on Mac versions of Excel?
Yes, the Remove Duplicates feature is available on Excel for Mac. The menu path is the same: Data tab > Remove Duplicates.
Will this remove duplicates across multiple different sheets?
No, the tool only works on a single selected range or table on one worksheet. To remove duplicates across multiple sheets, you must first combine the data into one master sheet using Power Query or by copying and pasting.