View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
TammyS TammyS is offline
external usenet poster
 
Posts: 19
Default Negative numbers in an IF formula

When I used the the step by step function to figure out the error, it said
that G100 was TRUE even though G10 was -20.

"SimonCC" wrote:

First of all, the formula will result in an error whenever any of the IF
condition evaluates to "", because addition (+) doesn't work with "" (empty
string).
So basically there are 4 possible final results from the formula:
"" + "" = error
number + "" = error
"" + number = error
number + number = number
Do you actually just want a "" as a final result instead of a partal result?
If so, try:
=IF(D9="","",IF(E10=0,"",IF(AND(G90,G100),"",IF( G9=G10,G9+E10,G10+E10))))

Secondly, what tells you that Excel is saying G10 (-20) is greater than
zero? Sorry I couldn't figure that part out.



"TammyS" wrote:

I'm working on an IF formula:

=IF(D9="","",IF(AND(G90,G100),"",IF(G9=G10,G9,G 10))+IF(E10=0,"",E10))

G9 and G10 can be positive or negative. If G9 or G10 is a negative number,
I want the greater of the two to be used and then to be added to E10. But
right now, Excel is saying -20 (which is G10) is greater than zero. I'm
getting a VALUE error.
Thanks.

TammyS