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

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
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,823
Messages
6,121,779
Members
449,049
Latest member
greyangel23

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