+ Reply to Thread
Results 1 to 7 of 7

calculating an age

  1. #1
    Registered User
    Join Date
    02-05-2005
    Posts
    57

    Unhappy calculating an age

    I have 2 cells, A1 were a date will be input and A2 were a date of birth will be input. I then have cell A3 were I would like it to show the someone's age next birthday at date in the cell A1. For example:

    A1 = 1 May 2005
    A2 = 15 June 1950 (date of birth)
    A3 = 55

    so on 1 May 2005, the age next birthday of the individual is 55.

    all help appreciated, thanks

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    =ROUNDUP(YEARFRAC(B1,A1),0)

    You need to enable the Analysis ToolPak to use this function. To do this, Tools > Addins. Check the box Analysis ToolPak

    Mangesh

  3. #3
    Registered User
    Join Date
    02-05-2005
    Posts
    57
    Thanks, I found a way using dateif from http://www.cpearson.com/excel/datedif.htm#Age, but your way is much easier, thanks alot

  4. #4
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    Thanks for the feedback. I have seen the link you mentioned.

    Mangesh

  5. #5
    Ragdyer
    Guest

    Re: calculating an age

    You can use the DATEDIF() function.
    Except in XL2k, however, that's an undocumented function.

    You can find it fully explained on Chip Pearson's web site at:

    http://www.cpearson.com/excel/datedif.htm
    --
    HTH,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------


    "rocket0612" <[email protected]> wrote
    in message news:[email protected]...
    >
    > I have 2 cells, A1 were a date will be input and A2 were a date of birth
    > will be input. I then have cell A3 were I would like it to show the
    > someone's age next birthday at date in the cell A1. For example:
    >
    > A1 = 1 May 2005
    > A2 = 15 June 1950 (date of birth)
    > A3 = 55
    >
    > so on 1 May 2005, the age next birthday of the individual is 55.
    >
    > all help appreciated, thanks
    >
    >
    > --
    > rocket0612
    > ------------------------------------------------------------------------
    > rocket0612's Profile:

    http://www.excelforum.com/member.php...o&userid=19492
    > View this thread: http://www.excelforum.com/showthread...hreadid=375004
    >



  6. #6
    Mangesh Yadav
    Guest

    Re: calculating an age

    Hi Ragdyer (Also to Chip Pearson),

    I was going through the link you mentioned, and saw the age calculation
    formula. It is not fool-proof. It fails at the following case:

    31-Jan-2000 1-Mar-2005 5 1 -2


    It shows the days as -2

    Mangesh



    "Ragdyer" <[email protected]> wrote in message
    news:[email protected]...
    > You can use the DATEDIF() function.
    > Except in XL2k, however, that's an undocumented function.
    >
    > You can find it fully explained on Chip Pearson's web site at:
    >
    > http://www.cpearson.com/excel/datedif.htm
    > --
    > HTH,
    >
    > RD
    >
    > --------------------------------------------------------------------------

    -
    > Please keep all correspondence within the NewsGroup, so all may benefit !
    > --------------------------------------------------------------------------

    -
    >
    >
    > "rocket0612" <[email protected]>

    wrote
    > in message news:[email protected]...
    > >
    > > I have 2 cells, A1 were a date will be input and A2 were a date of birth
    > > will be input. I then have cell A3 were I would like it to show the
    > > someone's age next birthday at date in the cell A1. For example:
    > >
    > > A1 = 1 May 2005
    > > A2 = 15 June 1950 (date of birth)
    > > A3 = 55
    > >
    > > so on 1 May 2005, the age next birthday of the individual is 55.
    > >
    > > all help appreciated, thanks
    > >
    > >
    > > --
    > > rocket0612
    > > ------------------------------------------------------------------------
    > > rocket0612's Profile:

    > http://www.excelforum.com/member.php...o&userid=19492
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=375004
    > >

    >




  7. #7
    Ron Rosenfeld
    Guest

    Re: calculating an age

    On Mon, 30 May 2005 03:48:01 -0500, rocket0612
    <[email protected]> wrote:

    >
    >I have 2 cells, A1 were a date will be input and A2 were a date of birth
    >will be input. I then have cell A3 were I would like it to show the
    >someone's age next birthday at date in the cell A1. For example:
    >
    >A1 = 1 May 2005
    >A2 = 15 June 1950 (date of birth)
    >A3 = 55
    >
    >so on 1 May 2005, the age next birthday of the individual is 55.
    >
    >all help appreciated, thanks


    =YEAR(DATE(YEAR(A1)+(A1>DATE(YEAR(A1),MONTH(
    A2),DAY(A2))),MONTH(A2),DAY(A2)))-YEAR(A2)


    --ron

+ 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