How to Remove Duplicates in Excel
Remove Duplicates deletes repeated rows from a range based on the columns you mark as the key. It is fast and built in, but it permanently drops rows, so the choice of key columns and a backup matter. In financial work it cleans duplicated transactions or master records before they double count in a model.
What it does and when to use it
Remove Duplicates scans the columns you select and keeps only the first occurrence of each unique combination, deleting the rest. The rows it keeps and removes depend entirely on which columns you treat as the key.
Use it when an export contains true repeats, such as a transaction pulled twice or a customer listed multiple times, and you want one clean record each. If you only need to see duplicates rather than delete them, conditional formatting or a helper count is safer.
Step by step
Always work on a copy first, because the removal is permanent once you save.
- Click any cell inside your data range or table.
- Go to
Data > Remove Duplicates. - Confirm the My data has headers box matches your range.
- Check only the columns that define a true duplicate, for example Invoice ID.
- Click OK and read the message reporting how many rows were removed.
- Spot check the result against the original count before saving.
| Columns checked | Result |
|---|---|
| All columns | Removes only fully identical rows |
| Invoice ID only | Keeps one row per invoice |
| Customer and Date | One row per customer per date |
Fewer key columns means more aggressive removal, so choose the columns that truly define a duplicate.
A model use case
A bank export occasionally lists the same payment twice. If that feeds a cash model unfiltered, it overstates outflows. Keying Remove Duplicates on the transaction reference column collapses the repeats to one row each, so the model counts every payment once.
For a master list of cost centers pulled from two systems, key on the center code to keep a single clean record per code. Always reconcile the before and after row counts so the cleanup is intentional, not accidental.
- Key columns decide what counts as a duplicate.
- The action is permanent, so duplicate the sheet first.
- Reconcile row counts before and after to confirm the result.
Pitfalls and limits
The biggest risk is choosing the wrong key columns and deleting rows that were not really duplicates, or leaving repeats because an extra column made near-identical rows look unique. Trailing spaces and inconsistent case can also hide true duplicates, since Excel compares the stored values.
Remove Duplicates is destructive and gives no built-in undo once the file is saved and reopened. For a reversible workflow, use a non-destructive alternative: flag duplicates with =COUNTIF() and filter, mark them with conditional formatting, or load the data through Power Query and use its Remove Duplicates step, which can be re-run and adjusted.
Prepare to Share
After cleaning duplicates, Prepare to Share helps tidy the workbook so the version you hand off reflects the deduplicated data, not your working copy.
Get ModelMint See how it worksFAQ
How do I find duplicates without deleting them?
Use conditional formatting at Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values, or add a helper column with =COUNTIF(range, cell) and filter for counts greater than 1. Both let you review duplicates before removing anything.
Does Remove Duplicates keep the first or last row?
It keeps the first occurrence in the range and removes the later ones. If you need to keep a specific row, sort the data so the row you want to retain appears first before running the tool.
Why did identical-looking rows survive Remove Duplicates?
Excel compares the actual stored values, so trailing spaces, different case in some setups, or a number stored as text versus a real number can make matching rows look unique. Clean those inconsistencies first, then run the tool again.