View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default problem with formula

=IF(W32=1,IF(T32-U32=0,"pb",IF(AND(T32-U32=-100,T32-U32<=50),"immaterial","")),V32)

The above formula works as is, however if the number in u is between 0 and
-100 then it doesn't return immaterial. For example if t=2 and u= -80
then
2-(-80) = 82 which isn't material but it should be. Should I use an
absolute
value or something--


Look at the innermost IF function call...

IF(AND(T32-U32=-100,T32-U32<=50),"immaterial","")

When T32=2 and U=-80, your and condition evaluates to FALSE... you have the
"immaterial" text in the TRUE part of the function call, not the FALSE part
where your post seems to indicate you want it.

Rick