+ Reply to Thread
Results 1 to 11 of 11

Calculate age between date/year and now to include months ie. 2.3 years

  1. #1
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Question Calculate age between date/year and now to include months ie. 2.3 years

    Hi all,

    I've tried searching here but cannot find specific solution.
    I need to calculate age of something installed until today's day but to include fraction of months. Here's my example:
    Please Login or Register  to view this content.
    I found many solutions but they all round it up and don't include months. Let me know if you need more clarification.

    Thanks,

    -Marinko
    Last edited by micko_escalade; 04-18-2016 at 06:35 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,024

    Re: Calculate age between date/year and now to include months ie. 2.3 years

    So 2.11 would be 2 years and 11 months and it's bigger than 2.9?
    Never use Merged Cells in Excel

  3. #3
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Calculate age between date/year and now to include months ie. 2.3 years

    Try this
    Please Login or Register  to view this content.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Calculate age between date/year and now to include months ie. 2.3 years

    See if you can adapt this to your needs...
    =IF(DATEDIF(A1,B1,"y")=0,"",DATEDIF(A1,B1,"y")&" years ")&IF(DATEDIF(A1,B1,"ym")=0,"",DATEDIF(A1,B1,"ym")&" months ")&DATEDIF(A1,B1,"md")&" days"

    (I know it goes beyond what you asked, delete what you dont need
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Calculate age between date/year and now to include months ie. 2.3 years

    Quote Originally Posted by zbor View Post
    So 2.11 would be 2 years and 11 months and it's bigger than 2.9?
    Thanks for the reply!

    Yes, 2.11 format would mean 2 years and 11 months.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,024

    Re: Calculate age between date/year and now to include months ie. 2.3 years

    Maybe this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Calculate age between date/year and now to include months ie. 2.3 years

    Quote Originally Posted by gmr4evr1 View Post
    Try this
    Please Login or Register  to view this content.
    Thanks, this is what I need!

    years.JPG

  8. #8
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Calculate age between date/year and now to include months ie. 2.3 years

    Quote Originally Posted by FDibbins View Post
    See if you can adapt this to your needs...
    =IF(DATEDIF(A1,B1,"y")=0,"",DATEDIF(A1,B1,"y")&" years ")&IF(DATEDIF(A1,B1,"ym")=0,"",DATEDIF(A1,B1,"ym")&" months ")&DATEDIF(A1,B1,"md")&" days"

    (I know it goes beyond what you asked, delete what you dont need
    With above formula I was getting 0 ?

  9. #9
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Calculate age between date/year and now to include months ie. 2.3 years

    Quote Originally Posted by zbor View Post
    Maybe this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    That works also, how is it different from gmr4evr1's formula?
    Hvala puno!

  10. #10
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,024

    Re: Calculate age between date/year and now to include months ie. 2.3 years

    First, mine will return text while gmr4evr1 returns number.
    Then use it on large scale and check does any approach return wrong result at some point.

  11. #11
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Calculate age between date/year and now to include months ie. 2.3 years

    Quote Originally Posted by zbor View Post
    First, mine will return text while gmr4evr1 returns number.
    Then use it on large scale and check does any approach return wrong result at some point.
    Got it!
    I've checked what I needed it for and appears to work correctly.

    Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formula that can calculate Year to Date % success across multiple years
    By abreet in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-23-2015, 11:30 AM
  2. How to calculate number of months by date range for a specific year?
    By redstyles in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-20-2015, 05:53 PM
  3. Replies: 5
    Last Post: 06-07-2008, 02:32 PM
  4. Replies: 1
    Last Post: 06-29-2006, 09:30 AM
  5. Calculate number of years and months employed using hire date and.
    By TryingTime in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-28-2006, 11:30 PM
  6. [SOLVED] HOW DO YOU CALCULATE AGE BY DATE OF BIRTH I NEED YEARS AND MONTHS
    By dallyup2 in forum Excel General
    Replies: 2
    Last Post: 02-28-2006, 04:25 PM
  7. calculate date differences in years and months
    By Joyce in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-14-2005, 02:06 PM

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