How do I do several formulas in one cell?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am in the process of trying to get this formula to work.
=IF(C8>0,200,0)*OR(C8<3,200,0)*OR(C8=3,350)*AND(C8>3,350)*OR(C8<5,350)*OR(C8>5,500)*OR(C8=5,500)

For example I am trying to figure times. So greater than 0 and less than 3
= 200 plus equal to 3, greater than 3 and less than 5 = 350, great than 5 =
500.

For some reason it's just calculating the first formula for 200. Can anyone
please help with this?
 
See if this does what you're looking for:

=IF(C8>=5,500,IF(C8>=3,350,IF(C8>=0,200,0)))

HTH,
Elkar
 
In this case you can use the following formula
=200*(C8>0)+150*(C8>3)+150*(C8>5)

On a side note, you are using AND and OR incorrectly. The following formula
will also do what you describe.

=IF(C8<=0,0,IF(AND(C8>0,C8<=3),200,IF(AND(C8>3,C8<=5),350,IF(C8>5,500))))

of course it can be simplified to what has already been offered (with a
slight modification) to this

=IF(C8>5,500,IF(C8>3,350,IF(C8>0,200,0)))
 
Back
Top