conditional formatting - color

  • Thread starter Thread starter Bert
  • Start date Start date
B

Bert

I'm trying to use conditional formatting to accomplish the following:
if the cell is empty or contains a greater than zero value, the cell
color is white (or no color), if there is a 0 in the cell, the cell color is
red.
This doesn't seem that difficult, but I'm not having success. Either it's
red all the time, or it's white all the time, regardless of value.
This is the conditional formula I'm using: Cell value is equal to
=AND(NOT(ISBLANK(P33)),P33=0)

Thanks.
Bert
 
I just left the "natural" fill white.

Then I used this as the formula in Format|conditional formatting:

=AND(P33<>"",P33=0)

And gave it a red fill.

But my formula is equivalent to yours and your formula worked ok for me.
 
Dave:
I tried your formula and it's not working either.
Here's what I did in Format|Conditional Formatting

In condition 1, if I enter an "E" the cell bg becomes green.
In condition 2, I have "Cell Value Is" "Equal to" and then your formula.
Then I set the format to red.

Here's what I expect to happen:
If there's nothing in the cell, it's white or "No fill".
If there is a 0 in the cell, it is red.
If there is any positive number, it is white or "No fill".

Instead, the cell stays white all the time.
 
I formatted the cell to have no fill color (it looked white).

Then I selected A1 and did:
format|conditional formatting
Condition 1:
Cell value is:
Equal to: ="E"
and gave it a green fill color

Condition 2:
Formula is: =and(a1<>"",a1=0)
and gave it a red fill color

And it worked ok for me.
 
Back
Top