Forum Discussion
Conditional Formatting based on two cells
- Jul 31, 2019
You may apply the rule to B1:B2 only and, if you need another colour for the pair B3:B4, create one more rule applying to B3:B4 with similar formula, only change B1 on B3 in it. Or, alternatively, create the rule for B1:B2, after that apply by Format Painter to B3:B4 and change colour for this pair rule.
First select the column or cells you want to apply conditional formatting then click on :
Conditional Formatting --> Highlight Cells Rules --> More Rules --> Format Only Cells With --> Blanks -- > Apply desired formatting.
This works for if I want to conditionally format one cell based on the value in that specific cell, however I want a conditional format that is based on two cells. So for example if there is a blank in either cell b1 or b2 then both those cells with remain red, however if i type in b1 OR b2 the red colour is removed in b1 AND b2. How do i do this please?
- tauqeeracmaJul 31, 2019Iron Contributor
Yes you can do conditional formatting based on two cells. Please apply below in Cell B1:
And this in B2
Thanks
- Bailey100Jul 31, 2019Brass Contributor
Hi, this works for blanks in both but if you input a number or text into one of the cells the format does not clear, until you have wrote in both. Do you know how to solve this,
Thanks!
- SergeiBaklanJul 31, 2019Diamond Contributor
You may use one rule with the formula
=LEN(B1&OFFSET(B1,MOD(ROW(),2)*2-1,0))=0applied to entire column B (starting from cell B1)