IF to determine if numbers are between values

lyman

New Member
Joined
Aug 23, 2013
Messages
19
Hello

I'm trying to write an if formula to determine which value should be returned when I have numbers between two values. I now realize I cannot do this just with IF function but I need the formula to calculate as follows:

If the cell has value less than 3000 return 150
If the cell has value between 3001 and 5000 return 300
If the cell has value between 5001 and 10000 return 650
If the cell has value above 100000 multiply value in cell by .09% and return result

I'm using the following formula:

=IF(A2<3000,150,IF(A2>3000,300,IF(A2>5000,650,IF(A2<10000,650,IF(A2>10000,A2*0.009,0))))

Where am I going wrong?

Thanks
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
How about
Excel Formula:
=if(a2<3000,150,if(a2<5000,300,if(a2<10000,650,a2*.009)))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
These guys were quicker than me, but I'll post my version anyway.

Code:
=IF(A2>=100000,A2*0.009,LOOKUP(A2,{0,3000,5000},{150,300,650}))
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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