+ Reply to Thread
Results 1 to 4 of 4

Calculating age from birthdate to today for people less than one year old.

  1. #1
    Registered User
    Join Date
    10-31-2012
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2010
    Posts
    12

    Calculating age from birthdate to today for people less than one year old.

    I am trying to calculate a person's age as a whole number.

    Here is the formula that I am using: =IF(C4="","",(INT(($B$2-$C4)/365.25))) in C5 with B2 as today's date with the formula =TODAY() and C4 as the cell to input the date of birth.

    The IF formula is to ensure that the cells in the C column are blank until a date of birth is entered. This works perfectly with all ages except for babies who are less than 1 year old. For exapmle: The interger formula returns an age of 59 for a person who will be turning 60 tomorrow. This is perfect; however, the cell appears blank for anyone under the age of 1.

    Ultimately I would like to have the date of birth for someone who is 7 months old to return a value of "7 months." If this is not possible I would settle for .7 or even 7\12 but not .5833.

    I don't mind scrapping my current formulas as long as column C remains blank until a date of birth has been entered and as long as the calculated age is not rounded up.

    Please help. This is way beyond me.
    Last edited by HeathHarlan; 10-31-2012 at 02:57 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Calculating age from birthdate to today for people less than one year old.

    How about this:

    =IF(C4="", "", IF(DATEDIF(C4,TODAY(),"y")>0, DATEDIF(C4,TODAY(),"y"), DATEDIF(C4, TODAY(),"M") & " months"))


    or

    =IF(C4="", "", IF(DATEDIF(C4,TODAY(),"y")>0, DATEDIF(C4,TODAY(),"y"), DATEDIF(C4, TODAY(),"M")+1 & " months"))

    Up to you which math is correct.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-31-2012
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Calculating age from birthdate to today for people less than one year old.

    THank you thank you thank you JBeaucaire!! THat was perfect!! And such a quick response!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Calculating age from birthdate to today for people less than one year old.

    I have marked this thread solved for you.
    In the future please select Thread Tools from the menu above and mark the thread as solved. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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