What is the excel formula to find duplicate values in two columns
Tutor 5 (81 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To find duplicate values in two columns in Excel, you can use a combination of the IF and COUNTIF functions.
A common approach is to compare the values in Column A against Column B and mark duplicates.
Formula:
=IF(COUNTIF(B:B, A1) > 0, "Duplicate", "Unique")
Explanation:
COUNTIF(B:B, A1)counts how many times the value in cellA1appears in Column B.> 0checks whether the value exists at least once in Column B.IF(..., "Duplicate", "Unique")returns"Duplicate"if the value exists in both columns, otherwise"Unique".
Steps to apply:
Click on the cell next to the first value in Column A (e.g., C1).
Enter the formula:
=IF(COUNTIF(B:B, A1) > 0, "Duplicate", "Unique").Press Enter.
Drag the fill handle down to apply the formula to all rows in Column A.
Conditional Formatting Alternative:
To highlight duplicates visually without a helper column:
Select Column A.
Go to Home → Conditional Formatting → New Rule.
Choose Use a formula to determine which cells to format.
Enter the formula:
=COUNTIF(B:B, A1) > 0
Click Format, choose a fill color, and click OK.
Notes:
Replace
A1andB:Bwith the specific ranges if your data is limited, e.g.,A1:A100andB1:B100.This method works for text, numbers, and dates.
For Mac users, the steps for Conditional Formatting are identical.
This approach ensures that you can quickly identify duplicates across two columns without manually checking each value.
Do you want me to provide a method that highlights duplicates in both columns simultaneously?
. Was this Helpful?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