#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 252
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 252
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default 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?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 95
Default 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?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 95
Default 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


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default 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?

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default 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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"