1
votes

I want to do conditional formatting if multiple columns are duplicates.

I know I can find duplicates in one column by doing conditional formatting with something like this:

=countif($A:A,$A1)>1

But how do I do the equivalent of this?

=countif($A:A&E:E,$A1&E1)>1

In other words, I only want the cells highlighted if the combination of A & E are duplicates.

As an example, if A is "First name" and E is "Last name", I only want the cells highlighted if the combination of First name and Last name are duplicates.

1

1 Answers

3
votes

You can use SUMPRODUCT:

=SUMPRODUCT(($A2=$A$2:A)*($E2=$E$2:E))>1

enter image description here