Datedif: Error: You've entered too many arguments for this Fuction

Charlene Durand

Board Regular
Joined
Sep 19, 2015
Messages
101
Office Version
  1. 365
Platform
  1. Windows
please help i have this formula and it is giving me a Error: You've entered too many arguments for this Fuction

=IFERROR(IF(DATEDIF($V15,$W15,"y")=0,"",DATEDIF($V15,$W15,"y")&"y ")&IF(DATEDIF($V15,$W15,"ym")=0,"",DATEDIF($V15,$W15,"ym")&" m "),IF(DATEDIF($V15,$AI15,"y")=0,"",DATEDIF($V15,$AI15,"y")&"y ")&IF(DATEDIF($V15,$AI15,"ym")=0,"",DATEDIF($V15,$AI15,"ym")&" m "),IF(DATEDIF($AI15,today(),"y")=0,"",DATEDIF($AI15,today(),"y")&"y ")&IF(DATEDIF($AI15,today(),"ym")=0,"",DATEDIF($AI15,today(),"ym")&" m ")))
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Looks like you missed some ampersands...

=IFERROR(IF(DATEDIF($V15,$W15,"y")=0,"",DATEDIF($V15,$W15,"y")&"y ")&IF(DATEDIF($V15,$W15,"ym")=0,"",DATEDIF($V15,$W15,"ym")&" m ")&IF(DATEDIF($V15,$AI15,"y")=0,"",DATEDIF($V15,$AI15,"y")&"y ")&IF(DATEDIF($V15,$AI15,"ym")=0,"",DATEDIF($V15,$AI15,"ym")&" m ")&IF(DATEDIF($AI15,TODAY(),"y")=0,"",DATEDIF($AI15,TODAY(),"y")&"y ")&IF(DATEDIF($AI15,TODAY(),"ym")=0,"",DATEDIF($AI15,TODAY(),"ym")&" m "),"")

Note I did not check the logic.
 
Upvote 0
this is what my original formula was:

=IFERROR(IF(DATEDIF($V15,$W15,"y")=0,"",DATEDIF($V15,$W15,"y")&"y ")&IF(DATEDIF($V15,$W15,"ym")=0,"",DATEDIF($V15,$W15,"ym")&" m "),IF(DATEDIF($V15,$AI15,"y")=0,"",DATEDIF($V15,$AI15,"y")&"y ")&IF(DATEDIF($V15,$AI15,"ym")=0,"",DATEDIF($V15,$AI15,"ym")&" m "))

i then wanted to add

,IF(DATEDIF($AI15,TODAY(),"y")=0,"",DATEDIF($AI15,TODAY(),"y")&"y ")&IF(DATEDIF($AI15,TODAY(),"ym")=0,"",DATEDIF($AI15,TODAY(),"ym")&" m ")

this is when the fault came in
 
Upvote 0
So correcting for ampersands did not deliver the result you want?

Care to explain what this means?

IF(DATEDIF($V15,$W15,"ym")=0,"",DATEDIF($V15,$W15,"ym")&" m "),IF(DATEDIF($V15,$AI15,"y")=0,"",DATEDIF($V15,$AI15,"y")&"y ")&
 
Upvote 0
I have a Engament Date Termination date then start of new job title and i want to get a result of Yers of service in job title
 
Upvote 0
Hi no it does not as it gives me a blank for all

this is yours:

=IFERROR(IF(DATEDIF($V15,$W15,"y")=0,"",DATEDIF($V15,$W15,"y")&"y ")&IF(DATEDIF($V15,$W15,"ym")=0,"",DATEDIF($V15,$W15,"ym")&" m ")&IF(DATEDIF($V15,$AI15,"y")=0,"",DATEDIF($V15,$AI15,"y")&"y ")&IF(DATEDIF($V15,$AI15,"ym")=0,"",DATEDIF($V15,$AI15,"ym")&" m ")&IF(DATEDIF($AI15,TODAY(),"y")=0,"",DATEDIF($AI15,TODAY(),"y")&"y ")&IF(DATEDIF($AI15,TODAY(),"ym")=0,"",DATEDIF($AI15,TODAY(),"ym")&" m "),"")

I then deleted the ,"") at the very end and then it gives me #num!
 
Last edited:
Upvote 0
This is not mine as I did not suggest any formula, only edited yours for ampersands which are possibly missing.

It's perhaps better that you describe the problem which you want to solve in words by giving examples.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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