Zero as a value
You need to sort out the difference between numbers and text strings.
Your "0" is a text string, and that evaluates to greater than the number 2,
hence the answer is the text string "1", from the first test in your
formula.
If you want numbers, leave out the quote marks.
If in F8 you put 0, rather than "0", you'll get "3", but of course that too
is a text string, not a number.
--
David Biddulph
"StephanieH" wrote in message
...
In F8, I have a formula that results in the value "0" (zero). I have the
cell formatted as a number.
In H8, I have the following formula:
=IF(F8=2,"1",IF(F8=1,"2",
IF(F8=0,"3",IF(F8=-1,"4",IF(F8<-2,"5","N/A")))))
Given that my result in F8 is 0, I would expect the expression to evaluate
to 3. However, it returns 1.
When I type over the result of the formula and enter 0 directly into the
cell, it does returns the correct answer of 3.
In each of my tests, when F8 results in anything other than 0, H8 seems to
work fine.
How do I get Excel to recognize the value 0 for F8 in cell H8?
|