Hi
You almost had it, just forgot a comma before your last "Income"
Wha- ... you mean I was close?? Wow!! said:
=IF(E5<0,"Income Loss:",IF(E5>0,"Income Gain:",IF(OR(E5=0,E5=""),"Income:")))
Well, darn. The only thing was that it didn't quite work. Tested it
and when E5 is blank I got "Income Gain:" when it should be under
condition E5=0 which should result in just "Income:".
So I got to thinking how sometimes in conditional formatting, the
order in which you put the conditions changes the outcome. And, after
reading tons more about nested if statements this morning (but this
time starting to understand better), the conditions, or "logical
tests" were stumping me on how to switch them around successfully. I
tried various permutations and got stuck every time.
So, for future reference and for others dimwits like me (yes, I'm a
dimwit when it comes to this stuff still ... <g>), I ended up figuring
the trick below that will work for me in future. As long as the
original formula works, no reason why the rearrangements shouldn't.
This:
=IF(E5<0,"Income Loss:",IF(E5>0,"Income
Gain:",IF(OR(E5=0,E5=""),"Income:")))
breaks down to this:
=
IF(E5<0,"Income Loss:",
IF(E5>0,"Income Gain:",
IF(OR(E5=0,E5=""),"Income:"
)))
and then I just cut the last line and put it above the first to get
this (<d'uh> simple when you figure out a trick!):
=
IF(OR(E5=0,E5=""),"Income:",
IF(E5<0,"Income Loss:",
IF(E5>0,"Income Gain:",
)))
Then I put everything back on one line and it seems to give me correct
results in every one of the 4 cases, whether ="" (blank), =0, >0, or,
<0:
=IF(OR(E5=0,E5=""),"Income:",IF(E5<0,"Income Loss:",IF(E5>0,"Income
Gain:",)))
Awesome! Thanks. I've tried to do things like this before, but only
lately have I been having moderate to good success. Glad I persevered