0
votes

I'm trying to highlight a cell using conditional formatting based on matching criteria in 2 different cells, 1 of which is the cell I want highlighted. In a row if a cell contains "ABC" and "Yes" in another I want the Yes cell highlighted.

I've yet to be able to figure out how to get this to work after searching and searching formulas. I've tried different IF, AND, etc formulas to no avail.

2
Can you give us specific cell addresses?BigBen

2 Answers

3
votes

Apply the conditional format to the cell that you want to be formatted. Use a conditional format with a formula. If you want to evaluate two different cells, you can use the AND() function to combine conditions, for example select cell B and use this CF formula

=AND(A1="ABC",B1="Yes")

This formula will evaluate to either TRUE or FALSE and the conditional format will be applied when the result is TRUE.

If you want the whole row to change color, select all the cells in row 1 and make sure that the formula locks in the correct columns with the $ sign.

=AND($A1="ABC",$B1="Yes")
0
votes

In cell A1, I've put ABC, and in B1, I've put Yes.

Then I used following formula in another cell's conditinal formatting:

=AND(EXACT(A1;"ABC");EXACT(B1;"Yes"))