Excel 2007 Conditional Formatting is not properly using custom formula provided

Posted by Charles on Super User See other posts from Super User or by Charles
Published on 2010-02-25T21:25:59Z Indexed on 2010/03/25 20:03 UTC
Read the original article Hit count: 464

In Excel 2007, I want to conditionally color a row if it is odd numbered and then vary the coloring depending on if a specific cell (in column E) in that row contains a number (green) or empty(red). E.g. if E15 has a value of 2 and E13 has no entry, I would expect row 15 to be green and row 13 to be red.

My two formulas are:
To color red:
=IF((MOD(ROW(),2) = 1),NOT(ISNUMBER(INDIRECT("$E$"&ROW()))), FALSE)
To color green:
=IF((MOD(ROW(),2) = 1),ISNUMBER(INDIRECT("E"&ROW())), FALSE)

If I paste these formulas into cells on the worksheet I get the expected values. For row 15 the "red" equation is false and the "green" equation is true. For Row 13 the "red" equation is true and the "green equation is false. However if I use these formulas in the conditional formating use formula feature, all of my rows are red, any thoughts?

© Super User or respective owner

Related posts about conditional-formatting

Related posts about excel-2007