0

My question is similar to this one, but adds a little more complexity.

How can I flag duplicate entries in a Google Sheets column unless the duplicates have different values in another column? For instance, consider the table

col A    col B
--------------
abc      123
def      123
ghi      456
ghi      456

How can I flag the last two rows which are the same in both col A and col B but not the first two which differ in col A?

1
  • this custom formula is able to flag 1st (cell) occurrence of a duplicate pair:

=COUNTIFS($A1:$A, "="&A1, 
          $B1:$B, "="&B1)<2

1

1
  • this custom formula is able to flag and protect all duplicate pairs:

=IF(LEN(A1:A), NOT(COUNTIF(
 ARRAYFORMULA(TRIM(TRANSPOSE(QUERY(TRANSPOSE($A$1:$B), , ROWS($A$1:$A))))),
 ARRAYFORMULA(TRIM(TRANSPOSE(QUERY(TRANSPOSE($A1:$B), , ROWS($A1:$A))))))>1), )

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.