Conditionally format a list of two-word items with A B treated the same as B A

60 Views Asked by At

What I have in Column A is a list of two-word items that need checking against each other to see if there are any duplicates. I have a formula in place:

=countif(A:A,A1)>1  

with the range entered as A1:A1000, that will highlight duplicates if they are entered in the same order. For example, Dog Cat would highlight Dog Cat. But I also want it highlight Dog Cat if I enter Cat Dog.

What formula would I use for that?

1

There are 1 best solutions below

1
On

Please try a Custom formula is of:

=and(countif(A$1:A1,A1)>1,or(countif(A:A,A1)>1,countif(A:A,"="&left(A1,find(" ",A1)-1)&mid(A1,find(" ",A1),len(A1)-find(" ",A1)+1))>1))  

Applied to ColumnA with the text copied from ColumnB and Formatting style of yellow fill the results are:

SO27289468 example

That is, the first instance from the top of both orders of a pair of words is not formatted.