View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Help with if/and formula

"kimkay" wrote:
2nd guess, maybe you mean something like ..:
=IF(OR(H3={0,1,2}),0,IF(AND(H3=3,H3<=25),MAX(2500 ,100*H3),"H3 is
out-of-range"))


Okay, Max, this one almost works -- if I enter the number 2 in H3, I get a
result of zero, which is correct. If I enter the number 26, I get the "H3 is
out-of-range" message, which is also correct, sort of (if I replace it with
"2500" it will achieve my goal, which is to have any value greater than 25 in
H3 to return a value of 2500). However, if I enter anything in between 3 and
25, I get 2500, which isn't what I need. I need the 100*H3 calculation to
happen on those number instead of the formula always returning the value of
2500.


Believe this should do it:
=IF(OR(H3={0,1,2}),0,IF(AND(H3=3,H3<=25),100*H3,2 500))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---