Forum Discussion

Assino960's avatar
Assino960
Copper Contributor
Sep 10, 2020
Solved

Compare two columns and highlight matches

Hello everyone i'm searching how to Compare two columns and highlight matches (1 on 1) there is many different ways but what i want is to highlight one cell if there is only 1 cell that contains ...
  • mtarler's avatar
    mtarler
    Sep 10, 2020

    Assino960  well you changed the rules a little. lol.  As for the errors in HansVogelaar method that was because you had an error in the formula in that sheet.  You probably shifted the sheet / target range because instead of A$1:A1 you had A$2:A2 and instead of referencing A2 it was looking at A3, which is what threw everything off.  That all said I think this set of conditional formatting formulas might be what you want:

    =COUNTIF(A$2:A2,A2)<=COUNTIF(B:B,A2)

    =COUNTIF(B$2:B2,B2)<=COUNTIF(A:A,B2)

    see attached sheet.

Resources