Search code examples
excelif-statementconditional-formatting

Using IF and conditional formatting


I'm trying to have a cell becoming highlighted if it satisfies two criteria.

I would like the cells below each Staff column to be purple if its both the same as the version# and contains *. I've managed to highlight cells containing the * by using "highlight if cells contain" ~* but I can't get it to do both.

Image of excel table in question highlighting cells containing *

I've tried

=AND(L2=$J2,"~*")

=AND($J2,"~*")

=IF(AND(L2=$J2,"~*"))

(Version# is column J, Staff 1 is column L)


Solution

  • Answer by BigBen

    If the Staff # contains an asterisk, will it always immediately follow the version #? If so you could just do =L2=$J2&"*"