Nested IF functions giving Too Many Arguments error

Stuepef

Board Regular
Joined
Oct 23, 2017
Messages
110
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.
 

Stuepef

Board Regular
Joined
Oct 23, 2017
Messages
110
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)))
 

Forum statistics

Threads
1,082,250
Messages
5,364,022
Members
400,774
Latest member
Goldi paul

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top