formula for less than or equal to

TonyW1234

New Member
Joined
Jul 26, 2007
Messages
31
Hi,

Please could anyone advise how to add a formula to work out if a value is > or equal to a number using an or statement, I currently have this formula but it doesnt seem to work

=IF(OR(Y2>0<=1185),5,IF(OR(Y2>1185<=4242),7,0))
thanks

Tony
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Try this:
Code:
=IF(OR(Y2>0,Y2<=1185),5,IF(OR(Y2>1185,Y2<=4242),7,0))
 
Upvote 0
thanks a lot for that, just what i needed

Tony
Hmmm, I'm wondering just what it was you did need - the answer 5 always? :confused:

I can't think of any number you could put in Y2 that would fail the first test..
OR(Y2>0,Y2<=1185)

I'm just guessing, but maybe you really wanted this?
Code:
=IF(AND(Y2>0,Y2<=1185),5,IF(AND(Y2>1185,Y2<=4242),7,0))
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top