Need help/advice on multiple If Statements

winderkent

New Member
Joined
Apr 26, 2017
Messages
11
Happy New Year Everyone,

I am trying to use an IF Statement here; however keep getting Syntax Error. Appreciate if anyone could kindly assist. Thank you

=IF((K7)>=60,(K7)<80),0.02, IF(AND((K7)>=80,(K7)<100),0.035, IF(AND((K7)>=100,(K7)>=120),0.0425,0.05)))

If the result is >=60%, then it will display 2%.
But if the result is >= 80%, then it will display 3.5%
Then if the result is >= 100%, then it will display 4.25%
Then if the result is >= 120%, then it will display 5.00%
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
This might solve it:

=IF(AND(K7>=60,K7<80),0.02, IF(AND(K7>=80,K7<100),0.035, IF(AND(K7>=100,K7<120),0.0425,IF(K7>=120,0.05,0))))

You appeard to have missed an AND after the first IF. The last IF contained an error as well. You also don't need to enclose the cell references in ()
This might be cleaner though:

=IF(K7>=120,0.05,IF(K7>=100,0.0425,IF(K7>=80,0.035,IF(K7>=60,0.02,0))))

You obviously have to input the number in K7 as a percentage and not as the actual numbers (e.g. 80 and not 0.8). Otherwise change the numbers in the formula accordingly.
 
Upvote 0
What should be returned if it is under 60%?

Code:
=IF(K7>=120%,5%,IF(K7>=100%,4.25%,IF(K7>=80%,3.5%,IF(K7>=60%,2%,"under 60%"))))
 
Upvote 0
You can also try:

Code:
=LOOKUP(K7,{0,0;0.6,0.02;0.8,0.035;1,0.0425;1.2,0.05})
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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