Find duplicates based on two columns in Google Sheets
Mark rows where the combination of two columns (e.g. first name + last name) repeats.
Conditional formatting → Custom formula, applied to A2:D:
=COUNTIFS($A$2:$A,$A2,$B$2:$B,$B2)>1As a helper column (E2, then fill down):
=IF(COUNTIFS($A$2:$A,A2,$B$2:$B,B2)>1,"Duplicate","")To get the distinct pairs only:
=UNIQUE(A2:B)In CleanRows, tick the two columns under Columns to compare.
Do it in two clicks inside Google Sheets. CleanRows highlights, deletes or moves duplicates by the columns you pick, ignores case/spaces/accents and compares two sheets. Free up to 1,000 rows. Get CleanRows →
More guides
- How to remove duplicates in Google Sheets (3 ways)
- How to highlight duplicates in Google Sheets
- How to compare two sheets in Google Sheets
- Remove duplicates but keep the last occurrence in Google Sheets
- How to count duplicates in Google Sheets
- Remove duplicates ignoring case and spaces in Google Sheets
- How to merge two sheets by a key column in Google Sheets
- How to remove blank rows in Google Sheets
- How to split full names into first and last name in Google Sheets
- How to fill blank cells with the value above in Google Sheets
- How to remove extra spaces in Google Sheets
- How to change text to uppercase, lowercase or proper case in Google Sheets
- How to find duplicates across two sheets in Google Sheets
- How to remove line breaks and hidden characters in Google Sheets
- Remove duplicate email addresses in Google Sheets