How to compare two excel sheets for duplicates
Tutor 5 (37 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
Comparing two Excel sheets for duplicates can be done using formulas, conditional formatting, or Excel’s built-in tools. Each method provides a clear way to identify whether data exists in both sheets.
Method 1: Using the VLOOKUP Formula
-
Open both Excel sheets in the same workbook.
-
Go to the sheet where you want to check for duplicates.
-
In a blank column, enter the formula:
=IF(ISNA(VLOOKUP(A2, Sheet2!A:A, 1, FALSE)), "Unique", "Duplicate")
-
A2is the cell you are checking. -
Sheet2!A:Ais the column in the second sheet to compare. -
"Duplicate"appears if the value exists in both sheets. -
"Unique"appears if it does not exist.
-
Drag the formula down the column to apply it to all rows.
Method 2: Using the COUNTIF Formula
-
Open both sheets in the same workbook.
-
In a blank column on Sheet1, type:
=IF(COUNTIF(Sheet2!A:A, A2)>0, "Duplicate", "Unique")
-
COUNTIFcounts how many times the value inA2appears in Sheet2. -
Returns
"Duplicate"if count is more than 0,"Unique"otherwise.
-
Drag the formula down to check all rows.
Method 3: Using Conditional Formatting
-
Select the range of data in Sheet1 that you want to check.
-
Go to Home > Conditional Formatting > New Rule.
-
Choose Use a formula to determine which cells to format.
-
Enter the formula:
=COUNTIF(Sheet2!A:A, A1)>0
-
Click Format and choose a fill color to highlight duplicates.
-
Press OK to apply formatting.
-
Duplicates in Sheet1 will now be highlighted.
On Mac, conditional formatting follows the same steps, but the menu path may slightly differ: Format > Conditional Formatting > Add Rule.
Method 4: Using Excel’s “Remove Duplicates” Tool
-
Copy data from both sheets into one new sheet.
-
Select all the data range.
-
Go to Data > Remove Duplicates.
-
Check the columns you want to compare.
-
Click OK.
-
Excel will display the number of duplicates removed, helping identify repeated entries.
Method 5: Using a Third-Party Tool or Add-In
Tools like Ablebits Duplicate Remover provide advanced options to compare multiple sheets, highlight duplicates, and export results. This is useful for large datasets.
Tips for Accuracy
-
Ensure data is clean: remove extra spaces using
TRIM(). -
Convert all text to the same case using
UPPER()orLOWER()to avoid mismatches. -
For multiple columns, combine them into one column using
=A2&B2&C2before comparing.
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
Excel chart axis labels not showing
Answers · 1
Excel chart title not showing
Answers · 1
Excel chart labels not showing
Answers · 1
Excel chart not showing data
Answers · 1