How to find and remove duplicates in excel
Tutor 5 (37 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To find duplicates in Excel, use Conditional Formatting. The tool highlights repeated entries so you can review them before removal.
Steps
-
Select the range you want to inspect.
-
Go to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values.
-
Choose a highlight color in the dialog box.
-
Click OK.
-
Review the highlighted duplicates in the worksheet.
Windows and Mac follow the same path for Conditional Formatting.
How to remove duplicates in Excel
To remove duplicates in Excel, use the built-in Remove Duplicates feature. The tool deletes repeated rows based on one or more selected columns.
Steps
-
Select the dataset you want to clean.
-
Go to Data > Remove Duplicates.
-
Check the columns Excel uses to identify duplicates.
-
Excel removes a row when all checked column values match an earlier row.
-
-
Click OK.
-
Review the notification box showing:
-
The number of duplicates removed.
-
The number of unique values left.
-
Windows and Mac share the same steps for this feature.
How to find duplicates using a formula (optional)
To flag duplicates with a formula instead of highlighting, insert a helper column and enter:
Formula (entered without formatting instructions in Excel)
A TRUE result means the value in A2 appears more than once. A FALSE result means the value is unique.
How to remove duplicates while keeping the first occurrence
To keep the first instance of each value, remove duplicates with the normal tool.
Steps
-
Select your data.
-
Go to Data > Remove Duplicates.
-
Select the columns Excel should compare.
-
Click OK.
Excel always preserves the first appearance and removes the later matches.
How to remove duplicates across multiple columns
Excel removes duplicates across multiple columns when all selected column values match.
Steps
-
Select the full table.
-
Go to Data > Remove Duplicates.
-
Select multiple columns in the dialog.
-
Click OK.
The row disappears when every selected column matches an earlier row.
How to find duplicates across sheets
To check duplicates between two sheets, use a formula.
Example formula
A TRUE result means the value appears on the other sheet.
How to remove duplicates but keep the most recent entry
To keep the most recent entry, sort the dataset first.
Steps
-
Select your full dataset.
-
Go to Data > Sort.
-
Sort the date column from Newest to Oldest.
-
Go to Data > Remove Duplicates.
-
Select the identifying column (such as an ID or name).
-
Click OK.
The most recent row appears first, and Excel removes the older entries.
How to prevent duplicates in Excel
To prevent duplicates in a column, use Data Validation.
Steps
-
Select the column for new entries.
-
Go to Data > Data Validation.
-
Choose Custom.
-
Enter this formula:
-
Click OK.
Excel blocks duplicate entries and displays a warning.
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
Why are margins not working
Answers · 1
Why is page layout not working
Answers · 1
How to print repeated rows on top in excel
Answers · 1
How to print header on each page
Answers · 1