How to compare two lists in excel for duplicates
Tutor 5 (95 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To compare two lists in Excel for duplicates, use the following methods. These methods work for both Windows and Mac versions, though shortcut differences may apply.
Method 1: Using Conditional Formatting
Select the first list of values.
Go to the Home tab.
Click Conditional Formatting → Highlight Cells Rules → Duplicate Values.
Choose a formatting style (e.g., light red fill with dark red text).
Click OK.
Condition: Only duplicates within the selected list will be highlighted.
To compare two separate lists:
Select the first list (e.g.,
).Go to Conditional Formatting → New Rule → Use a formula to determine which cells to format.
Enter the formula:
Replace
with the range of the second list.Choose a highlight format and click OK.
Result: Values in the first list that exist in the second list are highlighted.
Method 2: Using the COUNTIF Function
In a blank column next to the first list, enter:
Replace
with the second list range.Drag the formula down to check all items.
Result: Cells labeled "Duplicate" appear for matches between the two lists.
Variation: For large datasets, using COUNTIFS allows checking multiple criteria simultaneously.
Method 3: Using the MATCH Function
In a blank column, enter:
Drag the formula down for the entire list.
Explanation:
searches for the value of in the second list. returns if a match exists.The
function converts to "Duplicate" and to "Unique".
Method 4: Using VLOOKUP
In a blank column, enter:
Drag the formula down to all rows.
Explanation:
searches for a value in the second list. checks if the value is not found. outputs "Duplicate" if found or "Unique" if not.
Tips for Efficiency
Sort both lists before comparison for easier visual checks.
Use Remove Duplicates under the Data tab to clean each list before comparison.
For dynamic lists, consider using Excel Tables, which automatically adjust ranges in formulas like
.Highlighted duplicates with conditional formatting make reviewing results faster without extra columns.
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
What is the formula to highlight duplicate values
Answers · 1
What is the formula to remove duplicates
Answers · 1
How to delete duplicate values in excel
Answers · 1
How to delete duplicate rows based on one column
Answers · 1