How to remove duplicates based on two columns
Tutor 5 (87 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To remove duplicates based on two columns in Excel, use the built-in Remove Duplicates feature and specify the exact columns that define a duplicate record.
Step-by-step instructions
Select the full range that contains the columns you want to clean.
Go to the Data tab on the Ribbon.
Select Remove Duplicates.
Check only the two columns you want Excel to use for identifying duplicate rows.
Confirm your selection by clicking OK.
Review the results in the summary dialog showing the number of removed and remaining records.
Windows vs. Mac
Windows and Mac use the same menu path: Data → Remove Duplicates.
Mac displays the dialog in a slightly smaller window, but the options stay identical.
How Excel identifies a duplicate in this task
Excel identifies a duplicate when the values in both selected columns match another row exactly.
Two rows stay unique when any value in at least one of the selected columns differs.
Additional precision techniques
Using advanced filters
Advanced Filter creates a filtered copy while leaving the original data intact.
Select your data range.
Open Data → Advanced.
Select Copy to another location.
Check Unique records only.
Confirm by selecting OK.
Advanced Filter treats the entire row as a duplicate key.
A unique copy requires both selected columns and every remaining column to match.
When formulas become necessary
Formulas become necessary when you want to mark duplicates instead of deleting them.
The most common approach uses a helper column with a combined key.
Creating a helper column
Insert a new column.
Enter a combined key formula such as:
= A2 & "-" & B2
Fill the formula down the entire range.
Apply Conditional Formatting → Highlight Duplicate Values to the helper column to identify rows with matching combinations.
This technique supports auditing because it highlights patterns without deleting data.
Optimizing for large datasets
Large datasets with 50,000 rows or more perform faster with the basic Remove Duplicates tool because it uses Excel’s internal indexing engine.
The helper-column method supports visual review but performs more slowly as the dataset grows.
Recommended use cases
Use Remove Duplicates when the goal is to clean and finalize the dataset.
Use a helper column when the goal is to review and trace duplicates before removal.
Use Advanced Filter when the goal is to create a second list while leaving the original untouched.
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to show duplicates in red
Answers · 1
How to apply duplicate conditional formatting rule
Answers · 1
How to duplicate conditional formatting excel
Answers · 1
What is excel conditional formatting duplicates
Answers · 1