I'm not sure why Conditional Formatting isn't working correctly

Brass Contributor

Hello,  I hope you are all well.  

I'm having an issue with a worksheet and the Conditional Formatting I set up.  I have the formatting set to turn the cell:  Red if the value in the cell is less than 85%, Green if the value in the cell is 85% and above, and Blue, if the value in the cell is blank. 

I have tried clearing the entire cell, and redoing everything and I still have the same result.

What is happening is when the cell is blank it remains green instead of blue.  I have attached a screenshot. 

If anyone could assist and let me know what I am doing wrong, I'd greatly appreciate it.  

9 Replies
Hi

I’m not able to look at your attachment at present but I suspect that you have the conditions in the wrong order. If you put the blank check first ( you can move it up) and then check the box “stop if true”. This will then not apply the other checks. You can then have the other 2 formats applied in any order.

Hope this helps

Petet

@Michael1105 

That's since value of the blank cell is equivalent to zero, 0.85 is greater than zero, green condition triggers the color and next rule is not checked. You shall change (>0.85 and <>0 ) for this rule

@Sergei Baklan  well this is a first for me.  Sergei, I did some testing and ""<>0  and in fact it appears any text is evaluating > any number.  For example "1">999999 results TRUE  (but --"1">9 evaluates FALSE as expected)

so 

@MichaelAntonelli  change the rule to be (>0.85 and <>"" )

@mtarler 

Yes, exactly, any text is always "greater" than any number. But I don't see why do we shall to mix numbers and texts together.

 

First variant, as @peteryac60  suggested, is to move checking of blank cell on first position. "Stop if True" not necessary

image.png

This one is simplest and easiest. With only one but. In 95% of cases it works perfectly, but sometimes Excel re-order sequence of rules automatically. These are relatively complex cases, nonetheless, where possible it's better be independent of rules sequence. Like this:

image.png

with not complex formulas

=(G2<0.85)*(G2<>0)
=(G2>=0.85)*(G2<>0)
=G2=0

@peteryac60 Thank you very much!  Yes...that worked.  I wasn't aware that the conditions had to be in an order.  You taught me something very valuable!  I very much appreciate your response. :)

I thank you very much for replying.  I was able to get it to work properly with Peter's suggestion.@Sergei Baklan 

Thank you very much for responding. I tried the suggestion from Peter and it worked.
Thank you for replying. I did try Peter's suggestion and it seemed work fix the issue. Much appreciated :)

@Michael1105 

 

You are welcome.

 

Note also the comments left by @Sergei Baklan  especially that text is 'greater' than numbers - I should have mentioned this.

 

anyway good luck!

 

Pete