ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Age as of 1/1/08 (https://www.excelbanter.com/excel-discussion-misc-queries/155945-age-1-1-08-a.html)

clara

Age as of 1/1/08
 
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?

Rick Rothstein \(MVP - VB\)

Age as of 1/1/08
 
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


rdwj

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

"Clara" wrote:

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?


Rick Rothstein \(MVP - VB\)

Age as of 1/1/08
 
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


Jim Thomlinson

Age as of 1/1/08
 
Check out the link...

http://j-walk.com/ss/excel/odd/odd03.htm
--
HTH...

Jim Thomlinson


"rdwj" wrote:

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

"Clara" wrote:

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?


David Biddulph[_2_]

Age as of 1/1/08
 
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).
--
David Biddulph

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

"Clara" wrote:

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?




rdwj

Age as of 1/1/08
 

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


"Rick Rothstein (MVP - VB)" wrote:

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



clara

Age as of 1/1/08
 
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!



"Rick Rothstein (MVP - VB)" wrote:

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



David Biddulph[_2_]

Age as of 1/1/08
 
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.
--
David Biddulph

"Clara" wrote in message
...
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!


"Rick Rothstein (MVP - VB)" wrote:
The third parameter needs to be a String value... put quote marks around
it.


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?





All times are GMT +1. The time now is 08:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com