Nested If AND Statement producing message with Too Many Arguments - Need alternative

MAKlos

New Member
Joined
Mar 28, 2017
Messages
5
Hello Again! This is a continuation to my most recent post regarding this bonus structure discussed below. Here's an overview of what I'd like to achieve :

I am calculating the bonus % achieved based on a sliding scale of gross margin for a project with 2 types of bonus categories. The slide scale is different for each category as shown below and a % of the total revenue is awarded based on the gross margin falling within the scales :


Building Projects22.9% & Under23.0%-26.9%27.0% & Over
% of Total Revenue0.00%0.25%0.50%

<tbody>
</tbody>

Emergency Projects47.9% & Under48.0%-50.9%51% & Over
% of Total Revenue0.00%0.25%0.50%

<tbody>
</tbody>

I would to like to generate the above in a nested If AND statement with the data presented below :

F13 = Building or Emergency
E13 = Gross Margin % Achieved

Here is the formula :

=IF(F13="Building",IF(AND(E13<=22.9%),0%,IF(AND(E13>=23%,E13<=22.9%),0.07%,IF(AND(E13>=27%),0.1%,0,IF(F13="Emergency",IF(AND(E13<=47.9%),0%,IF(AND(E13>=48.0%,E13<=50.9%),0.25%,IF(AND(E13>=51%),0.50%,0))))))))

I am using Excel 2016 Version

Values are not being returned, but instead the following message is produced : "You've entered too many arguments for this function."


Here's the image of the spreadsheet :


Thanks in advance and looking forward to the reply!
MAKlos​




 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
The zero in red is the false argument for the IF statement so excel does not know what to do with everything after it.
Code:
[COLOR=#333333]=IF(F13="Building",IF(AND(E13<=22.9%),0%,IF(AND(E13>=23%,E13<=22.9%),0.07%,IF(AND(E13>=27%),0.1%,[/COLOR][COLOR=#ff0000]0[/COLOR][COLOR=#333333],IF(F13="Emergency",IF(AND(E13<=47.9%),0%,IF(AND(E13>=48.0%,E13<=50.9%),0.25%,IF(AND(E13>=51%),0.50%,0))))))))[/COLOR]

Maybe this is what you want. the percentages you have for building do not match what is in your table.
Code:
=IF(F13="Building",IF(AND(E13<=22.9%),0%,IF(AND(E13>=23%,E13<=22.9%),0.07%,IF(AND(E13>=27%),0.1%,0))),IF(F13="Emergency",IF(AND(E13<=47.9%),0%,IF(AND(E13>=48%,E13<=50.9%),0.25%,IF(AND(E13>=51%),0.5%,0)))))
 
Upvote 0
Thank you Scott! I was racking my brain thinking I had something wrong with the percentages and Yes, I will correct the gross margin percentages to match the table. Thank you for catching that!
 
Upvote 0

Forum statistics

Threads
1,214,913
Messages
6,122,207
Members
449,074
Latest member
cancansova

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