1

I am attempting to highlight cells that are greater than 15. But it's highlighting all of the cells in the row. I have a formula in the row so I do not know if that is messing with it. The formula is:

=IFERROR(IF(E7="","0", IF(NETWORKDAYS(E7,O7,MenuData!$G$3:$G$22)<0, "0", (NETWORKDAYS(E7,O7,MenuData!$G$3:$G$22)-1))),0)

I select the entire column that I want to apply the conditional formatting, select highlight cell rules.> greater than > and then put for it to select cells greater than 15 and to highlight them red. It then highlights everything greater than 15 but also selects the zeros that are 0 due to the if/iferror statements in the formula. Is there something wrong with my formula?

Here is what the column looks like once the conditional formatting is applied:

The column looks like once the conditional formatting is applied

0

1 Answer 1

1

Welcome to SO. Excel always treats text values as being greater than any number, for example:

="a">9999999999 -> TRUE

As your formula doesn't return a true zero 0, but a zero text value "0", the logic is still the same:

="0">9999999999 -> TRUE

You can either adjust your original Excel formula to return a numerical 0, e.g. =IFERROR(IF(E7="",0,..., or adjust your Conditional Formatting to apply only to numerical values, e.g. =AND(ISNUMBER(H4),H4>15)

Sign up to request clarification or add additional context in comments.

3 Comments

IIRC VALUE(<cell address>) is a way to convert text to number too - so you could do a pure numeric comparison too - Good catch btw ;-)
Thank you very much! It worked. I did not realize that putting the double quotes around the 0 made it a non-numerical value.
InvisibleInk glad it worked for you! + @JGFMK ah true, this is also useful! Cheers & merry Xmas to you both :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.