Conditional formatting

Copper Contributor



Basically, I am trying to color code my 2 columns based on text rules but I'm wondering if there was a function/formula for what I'm trying to accomplish. Both columns will have True or False and if a row contains both True in each column, I want to color both green. If the row contains both False, then I want to color it both red. If the row contains True then False or vice-versa, then I want to color both cells yellow. What is the easiest way to do this? Thank you!

4 Replies
best response confirmed by Hans Vogelaar (MVP)

@render_settings See attached example.




Let's say the values in C2:D100.

Select this range. The active cell in the selection should be in the top row, i.e. C2 or D2.


On the Home tab of the ribbon, click Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter the formula


Click Format...
Activate the Fill tab.
Select green as highlight color.
Click OK, then click OK again.


Repeat these steps, but with the formula


and red.


Finally, repeat them again with the formula


and yellow.

thank you so much!


Thanks for your PM.

Try these formulas: