CleanRows · Google Sheets guides

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)>1

As 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

Free online duplicate remover (CSV / list)