Nested IF functions giving Too Many Arguments error

Stuepef

Board Regular
Joined
Oct 23, 2017
Messages
128
Office Version
  1. 2021
Platform
  1. Windows
I have a workbook where I input information in specific cells to create combinations to calculate employee bonuses. My workbook has 4 tabs:
  1. Data
  2. Bonus
  3. Base Bonus
  4. Summary

The Data tab is formatted like this:
Column AColumn BColumn C
IF formula below
Base Salary?
Employee %
Company %
Employee $
Company $
Job TitleEmployee %Company %



EmployeeJob Title
BobbyOfficer
RickyOfficer
TiestoOfficer
RobertOfficer

<tbody>
</tbody>


C1 IF formula calculates based on the combinations listed below:
Code:
=IF(AND($B$2<>"",$A$8<>"",$B$8<>""),5,IF(AND($B$2<>"",$B$3<>""),3,IF($B$3<>"",1,IF($B$5<>"",2))))

Here are the different combinations numbered 1,2,3,5:
Employee % (cell B3) & Company % (cell B4) cells have numbers inputted = Combo 1
Employee $ (cell B5) & Company $ (cell B6) cells have numbers inputted =Combo 2
Base Salary (B2) is Yes & Employee % (cell B3) cells have been inputted = Combo 3
Base Salary (B2) is Yes & Job Title (A8) & Employee % (cell B8) cell have been inputted = Combo 5


I will further explain combo 3 specifically - If the base bonus is less than the regular bonus, than multiply the base bonus * Employee % + Company&Vendor bonus * Company %. If base bonus is more than regular bonus, than multiply regular bonus * Employee % + Company&Vendor bonus * Company %. Example:

Bobby
Base Bonus $50 < Regular Bonus $100
$50 * 50% employee % = $25
+ $200 company + $0 vendor * 50% company = $100
Final answer is $125 if base bonus is < regular bonus

I will further explain combo 5 specifically - If the base bonus is less than the regular bonus, than multiply the base bonus * employees job title Employee % + Company&Vendor bonus * job title Company %. If base bonus is more than regular bonus, than multiply regular bonus * employees job title Employee % + Company&Vendor bonus * job title Company %. Example:

Bobby
Base Bonus $50 < Regular Bonus $100
Find Bobby's Job title to determine Employee % & Company %
75% Employee % for Officers and 50% Company %
75% * $50 + 50% * ($200 Company & $0 Vendor) = $137.5
Final answer is $137.5 of base bonus is < regular bonus
---------------------------------------------------------------------------------------------------------------------------------

The Bonus Tab is formatted like this:
Column AColumn BColumn CColumn DColumn EColumn FColumn G
NameYrs. of ServicePromotionsBonusCompanyVendorTotal
Bobby001002000300
Ricky101100200100400
Tiesto002505000750
Robert313006000900

<tbody>
</tbody>

-----------------------------------------------------------------------------------------------------------------------------------
The Base Bonus Tab is formatted like this:
Column AColumn B
NameBase Bonus
Bobby50
Ricky100
Tiesto300
Robert300

<tbody>
</tbody>
-----------------------------------------------------------------------------------------------------------------------------------
The Summary Tab is formatted like this:
Column AColumn B
NameTotal Bonus
BobbyFormulas based on combination
RickyFormulas based on combination
TiestoFormulas based on combination
RobertFormulas based on combination

<tbody>
</tbody>
-----------------------------------------------------------------------------------------------------------------------------------

The issue I am having is when I combine all of the formulas together, I receive the Too Many Arguments error message. I would like to avoid making a secondary calculation table, but I am open to resolution options. Here are the formulas by combination that I would like to see if they can be put together into one large formula. See Next Comment for formulas.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Combo 1:
Code:
=IF(Data!$C$1=1,Data!$B$3*Bonus!B2+Data!$B$4*(Bonus!C2+Bonus!D2))

Combo 2:
Code:
=IF(Data!$C$1=2,Data!$B$3*Bonus!D2+Data!$B$4*(Bonus!E2+Bonus!F2),IF(Data!$C$1=2,IF(SUM(Bonus!B2:C2)<1,0,1)*Data!$B$6+Data!B5))

Combo 3:
Code:
=IF(Data!$C$1=3,IF(VLOOKUP(Summary!A2,'Base Bonus'!$A$2:$B$5,2,FALSE)< VLOOKUP(Summary!A2,Bonus!$A$2:$D$5,4,FALSE),VLOOKUP(Summary!A2,'Base Bonus'!$A$2:$B$5,2,FALSE)*Data!$B$3+Data!$B$4*(Bonus!E2+Bonus!F2),VLOOKUP(A2,Bonus!$A$2:$D$5,4,FALSE)*Data!$B$3+Data!$B$4*(Bonus!E2+Bonus!F2)))

Combo 5:
Code:
=IF(Data!$C$1=5,IF(VLOOKUP(Summary!A2,'Base Bonus'!$A$2:$B$5,2,FALSE)< VLOOKUP(Summary!A2,Bonus!$A$2:$D$5,4,FALSE),VLOOKUP(Summary!A2,'Base Bonus'!$A$2:$B$5,2,FALSE)*VLOOKUP(VLOOKUP(Summary!A2,Data!$A$16:$B$19,2,FALSE),Data!$A$8:$C$11,2,FALSE)+(Bonus!E2+Bonus!E2)*VLOOKUP(VLOOKUP(Summary!A2,Data!$A$16:$B$19,2,FALSE),Data!$A$8:$C$11,3,FALSE),VLOOKUP(A2,Bonus!$A$2:$D$5,4,FALSE)*VLOOKUP(VLOOKUP(Summary!A2,Data!$A$16:$B$19,2,FALSE),Data!$A$8:$C$11,2,FALSE)+(Bonus!E2+Bonus!E2)*VLOOKUP(VLOOKUP(Summary!A2,Data!$A$16:$B$19,2,FALSE),Data!$A$8:$C$11,3,FALSE)))
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

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