IF Function with range of values

desertfox

New Member
Joined
Feb 1, 2015
Messages
4
My Scenario is as follows:-

If the Value is >=1, <=2 then the value will be 4.5
If the Value is >2, <=4 then the value will be 4.5
If the Value is >4, <=7 then the value will be 80%
If the Value is >7, <=9 then the value will be 60%

I tried the following Formula:-

=IF(C17=0,0,IF(C17<=2,4.5,IF(C17>2,4,IF(C17<=4,4,IF(C17>=4,C17*0.8)))))

but not working.

Please anybody can help?

Regards
Desert Fox
 
you have 4.5 twice
and you also have 80% and 60% of what ?
C17?

=IF(C17<1,0,IF(C17<=4,4.5,IF(C17<=7,C17*0.8,IF(C17<=9, C17*0.6, "greater than 9"))))

 
Upvote 0
Create a small table
ColA ColB
1
2 4.5
4 4.5
7 80%
9 60%

use formula
=LOOKUP(C7,$A$1:$A$5,$B$1:$B$5)
 
Upvote 0
Sorry should be

ColA.....ColB
0.........0.0%
1.........4.5%
4.1......80.0%
7.1......60.0%
9........60.0%
9.1.....> 9
 
Upvote 0
=IF(AND(C17>=1,C17<=2),4.5,IF(AND(C17>2,C17<=4),4.5,IF(AND(C17>4,C17<=7),C17*0.8,IF(AND(C17>7,C17<=9),C17*0.6))))

I hope that helps
 
Upvote 0

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