+ Reply to Thread
Results 1 to 3 of 3

How does Excel allow for leap years?

  1. #1
    Neil
    Guest

    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. #2
    Peo Sjoblom
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    >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. #3
    Neil
    Guest

    Re: 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" <[email protected]> wrote in message
    > news:[email protected]...
    > >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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1