Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Neil
 
Posts: n/a
Default How does Excel allow for leap years?

I am trying to calculate the number of years in a person's age by reference
to date of birth and today's date.
When I put DoB as 12/5/2003 against today's date of 11/05/2006, it comes
back as 3 whole years, when in fact it is 2 and 364 days. Excel seems to be
ignoring the leap year in 2004. If I use 13/05/2003 as DoB, it comes back
correctly as just 2 years.
How can I correct fro this via a simpel formula?

Many thanks in advance for all help received?
Neil
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default How does Excel allow for leap years?

=DATEDIF(A1,TODAY(),"y")&" year(s) and "&DATEDIF(A1,A2,"yd")&" day(S)"

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"Neil" wrote in message
...
I am trying to calculate the number of years in a person's age by reference
to date of birth and today's date.
When I put DoB as 12/5/2003 against today's date of 11/05/2006, it comes
back as 3 whole years, when in fact it is 2 and 364 days. Excel seems to
be
ignoring the leap year in 2004. If I use 13/05/2003 as DoB, it comes back
correctly as just 2 years.
How can I correct fro this via a simpel formula?

Many thanks in advance for all help received?
Neil



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Neil
 
Posts: n/a
Default How does Excel allow for leap years?

Thanks Peo, this basically helps me to solve it (as I only want the number of
complete years, I just need the first part of the formula).
By the way, I am not familiar with DATEDIF and it does not appear to be on
my list of available formuale in my version of Excle (Office Xp) (yet it
still works).

Alos, whilst I know what TODAY() is and I assume that, in your example, the
date for comaprison is in cell A1, what would be in cell A2?

Many thanks again.
Neil

"Peo Sjoblom" wrote:

=DATEDIF(A1,TODAY(),"y")&" year(s) and "&DATEDIF(A1,A2,"yd")&" day(S)"

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"Neil" wrote in message
...
I am trying to calculate the number of years in a person's age by reference
to date of birth and today's date.
When I put DoB as 12/5/2003 against today's date of 11/05/2006, it comes
back as 3 whole years, when in fact it is 2 and 364 days. Excel seems to
be
ignoring the leap year in 2004. If I use 13/05/2003 as DoB, it comes back
correctly as just 2 years.
How can I correct fro this via a simpel formula?

Many thanks in advance for all help received?
Neil




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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Excel MDI/SDI/Excel Instance to behave more logically mswlogo Setting up and Configuration of Excel 2 April 23rd 23 11:43 AM
Excel 5 and Excel 2000 question. Naveen Mukkelli Excel Discussion (Misc queries) 1 March 3rd 06 09:05 AM
Need suggestions for some uses of Ms Excel Bible John Excel Discussion (Misc queries) 1 February 27th 06 05:30 PM
Excel Formula - Compute Number of Years Worked Penny Excel Discussion (Misc queries) 2 August 11th 05 07:39 PM
Display form from an VB application in Excel kuhni Excel Discussion (Misc queries) 0 August 10th 05 06:04 PM


All times are GMT +1. The time now is 08:53 AM.

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"