+ Reply to Thread
Results 1 to 6 of 6

Adding quantity of months.years please.

  1. #1
    Registered User
    Join Date
    06-09-2015
    Location
    Largs
    MS-Off Ver
    07
    Posts
    2

    Adding quantity of months.years please.

    Hi there

    Need formula to allow year.month differences.

    Eg:
    Reading age: 4.07. (4 years and 7 months.) Actual age 6.08 (6years 8months) what is the difference

    Problem occurs when it goes beyond 10 eg 10 or 11 months.

    Any help gratefully received.

    Lizx

  2. #2
    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
    52,917

    Re: Adding quantity of months.years please.

    See if you can adapt this for what you want, it will calc years, months and days (where applicable)...
    =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"

    A1=start date
    B1=end date
    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

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Adding quantity of months.years please.

    Another way:

    Row\Col
    A
    B
    C
    D
    1
    Age 1
    Age 2
    Diff
    2
    4.07
    6.08
    2.01
    C2: =DOLLARFR(DOLLARDE(B2, 12) - DOLLARDE(A2, 12), 12)
    3
    3.06
    4.05
    0.11
    4
    0.04
    7.10
    7.06
    5
    2.07
    6.05
    3.10
    6
    3.06
    4.11
    1.05
    7
    3.08
    4.09
    1.01
    8
    0.03
    6.04
    6.01
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    05-09-2015
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    Office2007
    Posts
    47

    Re: Adding quantity of months.years please.

    Hi Lizx,

    This is almost the same formula as shg with slight difference:

    =DOLLARFR(ROUND(DOLLARDE(B2,12)-DOLLARDE(A2,12),9),12)

    Untitled.jpg

    Besides attached is Excel file may be helpful for future reference.

    Will appreciate your feedback Thanks.

    Sakib
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-09-2015
    Location
    Largs
    MS-Off Ver
    07
    Posts
    2

    Re: Adding quantity of months.years please.

    Perfect!!!

    Amazing

    You have save me hours of work. Thanks lizx

  6. #6
    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
    52,917

    Re: Adding quantity of months.years please.

    Just out of curiosity, which 1 worked for you?

    Also, Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Adding Series of Years, Months, & Days
    By jmaitri in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-10-2019, 03:41 AM
  2. Replies: 3
    Last Post: 09-05-2014, 08:07 PM
  3. Replies: 4
    Last Post: 01-31-2012, 04:07 PM
  4. adding years and months
    By sagar in forum Excel General
    Replies: 6
    Last Post: 09-25-2009, 11:32 AM
  5. [SOLVED] Excel Adding years or months to a date
    By Joan in forum Excel General
    Replies: 2
    Last Post: 04-25-2005, 04: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