If condition with between ranges

suriya6in

New Member
Joined
Apr 23, 2003
Messages
32
Hi

Is there any possibility of giving IF function along with finding data inbetween a particular ranges of values?

ie., if A1 is > 100 but < 200, some logical result else if it is between someother range, next logical result and so on!
if yes, clear syntax pls!!

suriya
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Yes it can be done, but for a clear syntax it would help if you said where you need to use it! In a Report? in VBA? in a Query?
For a Query you can use nested Iif statements
CheckValue: IIf([id]>2000 And [id]<3000,"2 to 3",IIf([id]>3000 And [id]<4000,"3 to 4","None of the Above"))
If you need to use a lot of options then you may be better off writing a custom function to handle it.

HTH

Peter
 
Upvote 0
Hi

Yes i need to use it in a query!
But say,

=IF(A1>20 And A1<30,"hi",false)


Is this a correct format? but this gives an error that the formula entered is wrong!!

suriya
 
Upvote 0

Forum statistics

Threads
1,221,572
Messages
6,160,575
Members
451,656
Latest member
SBulinski1975

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