Results 1 to 3 of 3
  1. #1
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts

    Date Arithmetic (2000)

    I want to enter a person's date of birth, then a subsequent date (e.g. today's date), and calculate the number of years, months and days the person has been alive.

    I've been fooling around with this, but I haven't had much success. I'm thinking that it may be much more complicated than it seems, since years and months have different numbers of days.

    If one was born on July 15, for example, then entering July 14 of any year should return X years, 11 months, 29 days.

    If the "whole enchilada" is too difficult, I could settle for something that returned the number of years and months.

    Surely, this wheel doesn't have to be reinvented.

    Regards and thanks,
    Lou Sander
    Pittsburgh, Pennsylvania
    U.S.A.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  2. #2
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Perth, Western Australia, Australia
    Posts
    190
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Arithmetic (2000)

    Try
    ="Age is "&DATEDIF(C8,TODAY(),"y")&" Years, "&DATEDIF(C8,TODAY(),"ym")&" Months and "&DATEDIF(C8,TODAY(),"md")&" Days".

  3. #3
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts

    Re: Date Arithmetic (2000)

    It works perfectly. Thanks.

    The DATEDIF() function is in the Help file, but only if you already know you're looking for it (it says it's there for compatibility with Lotus). You can look at the list of Excel date functions (which I did), and it doesn't show up.

    Thank you, Microsoft, for providing this nice function, but curse you for making it so non-easy to find.

    Thank you, Woody's Lounge, for providing answers to all those things we curse Microsoft for.

    Thank you, Kieran, for knowing this stuff and passing it along.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

Posting Permissions

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