You've entered too many arguments for this function

kae2011

New Member
Joined
Mar 10, 2016
Messages
3
My current formula is
=IF(D$14>EOMONTH($C15,0)-$C15+1,"NA",
IF(OR(DATE(YEAR($C15),MONTH($C15),D$14)<I_ER_START, DATE(YEAR($C15),MONTH($C15),D$14)>I_ER_END),"NA",
IF(OR(DATE(YEAR($C15),MONTH($C15),D$14)<C_EMP_START, DATE(YEAR($C15),MONTH($C15),D$14)>C_EMP_END),"NE",
IFERROR(
@INDEX(T_VAC[Vacation Type],SUMPRODUCT(--(T_VAC[Employee]=I_ER_EMP),--(T_VAC[Start Date]=DATE(YEAR($C15),MONTH($C15),D$14)),ROW(T_VAC[Vacation Type]))-@ROW(T_VAC[#Headers])),
IF(IFERROR(MATCH(DATE(YEAR($C15),MONTH($C15),D$14),L_HOLS,0),0)>0,"HOL",
IF(@INDEX(L_WKNDS,WEEKDAY(DATE(YEAR($C15),MONTH($C15),D$14))),"WKND",
"Work"))))))


I am trying to add 1 line into the formula to return a value if there is more than one data entry in the vacation table but every time I do it gives me the error of "You've entered too many arguments for this function"
The formula below is what I am trying to enter, I cant see where my parenthesis are wrong
=IF(D$14>EOMONTH($C15,0)-$C15+1,"NA",
IF(OR(DATE(YEAR($C15),MONTH($C15),D$14)<I_ER_START, DATE(YEAR($C15),MONTH($C15),D$14)>I_ER_END),"NA",
IF(OR(DATE(YEAR($C15),MONTH($C15),D$14)<C_EMP_START, DATE(YEAR($C15),MONTH($C15),D$14)>C_EMP_END),"NE",
IFERROR(@IF(COUNTIFS(T_VAC[Employee],$C11,T_VAC[Start Date],D$10)>1,"1>",
@INDEX(T_VAC[Vacation Type],SUMPRODUCT(--(T_VAC[Employee]=I_ER_EMP),--(T_VAC[Start Date]=DATE(YEAR($C15),MONTH($C15),D$14)),ROW(T_VAC[Vacation Type]))-@ROW(T_VAC[#Headers])),
IF(IFERROR(MATCH(DATE(YEAR($C15),MONTH($C15),D$14),L_HOLS,0),0)>0,"HOL",
IF(@INDEX(L_WKNDS,WEEKDAY(DATE(YEAR($C15),MONTH($C15),D$14))),"WKND",
"Work"))))))


I attached are pictures of my workbook with sample data to help if needed
What I am looking for is that both the Team Dashboard (shows just 1 month) and Annual Employee Report (shows entire year) to match for the correct month, as of right now if I have more than one data entry for a day it will highlight blue in the Team Dashboard shown on January 6th, but in the Annual it shows up as a work day due to the iferror formal thats entered. Any help will be greatly appreciated!

Team Dash .jpg
Annual Employee Report.jpg
Vacation Table.jpg
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,431
Office Version
  1. 365
Platform
  1. Windows
That is a big mess to try and unravel, as far as I can see you have missed the closing parenthesis on the IF function that you added to the formula.

It think that I've added it in the correct place here, but as it contains table names I've not been able to confirm that in excel.

Excel Formula:
=IF(D$14>EOMONTH($C15,0)-$C15+1,"NA",
IF(OR(DATE(YEAR($C15),MONTH($C15),D$14)<I_ER_START, DATE(YEAR($C15),MONTH($C15),D$14)>I_ER_END),"NA",
IF(OR(DATE(YEAR($C15),MONTH($C15),D$14)<C_EMP_START, DATE(YEAR($C15),MONTH($C15),D$14)>C_EMP_END),"NE",
IFERROR(@IF(COUNTIFS(T_VAC[Employee],$C11,T_VAC[Start Date],D$10)>1,"1>",
@INDEX(T_VAC[Vacation Type],SUMPRODUCT(--(T_VAC[Employee]=I_ER_EMP),--(T_VAC[Start Date]=DATE(YEAR($C15),MONTH($C15),D$14)),ROW(T_VAC[Vacation Type]))-@ROW(T_VAC[#Headers]))),
IF(IFERROR(MATCH(DATE(YEAR($C15),MONTH($C15),D$14),L_HOLS,0),0)>0,"HOL",
IF(@INDEX(L_WKNDS,WEEKDAY(DATE(YEAR($C15),MONTH($C15),D$14))),"WKND",
"Work"))))))
 

Watch MrExcel Video

Forum statistics

Threads
1,127,313
Messages
5,623,941
Members
416,001
Latest member
teabag

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
Top