Age as of 1/1/08

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I looked at a few samples on here, and on CPearson's site regarding Datedif,
but am not getting results.

The DOB is on cell B5 and 1/1/08 is on cell C1. The formula is written like
this:

=DATEDIF(B5,C1,Y)

The result is #NAME? - why?
 
I looked at a few samples on here, and on CPearson's site regarding
Datedif,
but am not getting results.

The DOB is on cell B5 and 1/1/08 is on cell C1. The formula is written
like
this:

=DATEDIF(B5,C1,Y)

The result is #NAME? - why?

The third parameter needs to be a String value... put quote marks around it.

Rick
 
datedif is available in Visual Basic, not in excel.
However, you can just use b5-c1 and format the cell as "Y".
 
datedif is available in Visual Basic, not in excel.

The VB function is DateDiff (note the 2 F's at the end). Excel **does** have
a DATEDIF function (note the 1 F at the end)... it is undocumented, but it
does exist. See here http://www.cpearson.com/excel/datedif.htm for more
info.

Rick
 
I'm fascinated to hear that DATEDIF isn't available in Excel, having used it
often. Which version of Excel do you have, rdwj, that doesn't have the
DATEDIF function? The oddity is that it is, as far as I am aware, the only
Excel function which doesn't occur in Help [except for in Excel 2000](which
is why the usual reference on the subject is
http://www.cpearson.com/excel/datedif.htm).
 
woohw, impressed. Never knew, thanks. Indeed the single f and double
f has fooled me - always used a VB function to the double-ff functionality.
Txs. R
 
Thanks Rick that worked =DATEDIF(B5,C1,"Y")

I need help with another formula. I have to figure out how many pay periods
are remaining between hire date and today with a 26 payperiods.

i can't figure out where to start. All help greatly appreciated!
 
Well we could all guess, but why not start by telling us how long a pay
period is?

As stated elsewhere in the thread, the best source for information on the
syntax of the DATEDIF function is http://www.cpearson.com/excel/datedif.htm
If your pay period is defined as a number of days, you don't need DATEDIF
and can merely subtract one date from another to give a number of days.
 
Back
Top