In Excel, how would I perform the following using the IF
condition?
- If cell is empty then set the background color to red.
- If cell has a value then set the background color to green.
In Excel, how would I perform the following using the IF
condition?
You could apply a regular red fill, then use conditional formatting to make it green if populated, e.g. in conditional formatting use the
"use a formula to determine which cells to format" option with the formula
=A1<>""
assumes formatting applied to cell A1, change as appropriate. For a range of cells just write the formula for the top left cell, e.g. to format B3:J10 this way select that range and use
=B3<>""
=A1=""
. Another nice thing about Conditional Formatting, is that it can be set for one rule to apply to multiple (and non-adjacent) cells.
– Iszi
Oct 15 '12 at 16:36