Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datedif() in excel versions

Status
Not open for further replies.

matrixindicator

IS-IT--Management
Sep 6, 2007
418
BE
I have a simple datedif function that in this case calculate the number of days between 2 dates. It works fine for me but when a user is trying it the function gives an error. Whe send it to the IT-Helpdesk. We all use the same version of excel. (a possible cause can be the version of excel)

Code:
2009-02-01 d
2009-03-01

=DATEDIF(A1;A2;B1)

What is this, what can it be ?
 



Hi,

Should it not be...
[tt]
=DATEDIF(B1;A1;A2)
[/tt]


Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Might some users be set up for European style separators (";") and some for American style (",")?

_________________
Bob Rashkin
 
I think DateDif is part of the Analysis Toolpak addin. Does that user have it installed?

[tt][blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Hi John, no it's not part of the Analysis Toolpak. It's help to know exactly what the error is, rather than just "the function gives an error". I had a user mis-spelling it once ... using DATEDIFF instead of DATEDIF.

Cheers, Glenn.

Beauty is in the eye of the beerholder.
 



It seems that the DATEDIF sheet function is an undocumented date function, with arguments date1, date2, interval type, as opposed to the DateDiff VB function, which has the interval type as the first argument.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hey, this is the VBA forum! How'd I get in here??

Sorry, I was thinking that the OP meant the DateDif worksheet function.

But that isn't part of the Analysis Toolpak anyway, so I just wasted everyone's time. Sorry about that. I'll try to keep track of where I am.

[tt][blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top