Appearance
How to Remove Duplicate Rows in Excel
Estimated Time to Fix: 3 minutesApplies to: Microsoft Excel (Microsoft 365, Excel 2021, Excel 2019, Excel for the web)
Article Type: How-To
Last Updated: 2026-07-16
Summary
Find and remove duplicate rows in Excel using the built-in Remove Duplicates tool. This guide also covers how to preview duplicates with conditional formatting before deleting them.
Prerequisites
- Microsoft Excel (desktop or web).
- A spreadsheet with data that may contain duplicate rows.
Instructions
1. Remove Duplicates with the Built-In Tool
Use Excel's one-click tool to delete duplicate rows.
- Click any cell inside your data range. Excel automatically detects the full table.
- Go to the Data tab on the ribbon.
- Click Remove Duplicates in the Data Tools group.
- In the dialog box, check which columns Excel should use to identify duplicates:
- Check all columns to match entire rows.
- Uncheck columns to ignore differences in specific fields (for example, uncheck a timestamp column if you only want to match by name).
- Click OK.
Excel tells you how many duplicates were removed and how many unique values remain.
TIP
Always save a copy of your spreadsheet before removing duplicates. The removal is permanent once you save — Ctrl + Z only works before you close the file.
2. Highlight Duplicates Before Removing (Optional Preview)
Use conditional formatting to visually identify duplicates before deleting anything.
- Select the column you want to check for duplicates (click the column header to select the entire column).
- Go to the Home tab and click Conditional Formatting.
- Select Highlight Cells Rules > Duplicate Values.
- Choose a highlight color (the default red fill works well) and click OK.
All duplicate values in the selected column are now highlighted. Review them to confirm they're truly duplicates before using Remove Duplicates.
For the fuller set of options — highlighting whole rows, marking only the second and later copies, counting how many duplicates exist, and comparing two sheets — see How to Find and Highlight Duplicates in Excel.
3. Remove Duplicates in a Table
If your data is formatted as an Excel Table (blue header row), the tool works the same way from a different location.
- Click inside the table.
- Go to the Table Design tab (this tab appears when the table is selected).
- Click Remove Duplicates.
- Select columns and click OK.
4. Verify the Results
Confirm only true duplicates were removed.
- Check the row count in the bottom-left status bar and review your data.
- If you accidentally removed rows you needed, press Ctrl + Z immediately to undo.
Troubleshooting
WARNING
The Remove Duplicates tool permanently deletes rows. It keeps the first occurrence and removes all subsequent matches. If the order of your data matters, sort your data first so the row you want to keep appears at the top.
| Symptom / Error | Potential Cause | Solution |
|---|---|---|
| "Remove Duplicates" button greyed out | Sheet or cells are protected | Go to Review > Unprotect Sheet, enter the password if prompted, then try again. |
| No duplicates found, but you know they exist | Wrong columns selected | Re-run Remove Duplicates and check only the column(s) that should match (e.g., email address or ID number). |
| Too many rows removed | All columns checked when they shouldn't be | Press Ctrl + Z to undo. Re-run and uncheck columns with unique data (like timestamps or row IDs). |
| Duplicates highlighted but not removed | Conditional formatting only highlights — it doesn't delete | Use conditional formatting to preview, then use the Remove Duplicates tool from the Data tab to actually delete them. |