+ Reply to Thread
Results 1 to 7 of 7

Calculate Date Difference in Years, Months, Weeks and Days

  1. #1
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Calculate Date Difference in Years, Months, Weeks and Days

    Available dates are as under.

    Entry Date : 27-Dec-1990
    Stop Date : 24-Jul-2012
    Start Date: 21-Apr-2014
    Exit Date : 29-Feb-2024

    There may two scenario may arise.

    1. in above scenario calculation may done as per below logic
    (Stop Date – Entry Date) + (Exit Date – Start Date)

    2. in second scenario Stop Date and Start Date will be Blank in that case Calculation logic is simple
    (Exit Date – Entry Date)

    I need single formula which can handle both scenario and give output in Years, Months, Weeks and Days. For example 31 years, 5 months, 1 weeks, 1 days.

    You are welcome if we can get result as 34 years, 10 months, 30 days

    For example in any particular case actual result is 31 years, 0 months, 1 weeks, 1 days, then it should be returned as 31 years, 1 weeks, 1 days and vice versa

    I Have Office 2007, so provide the formula accordingly.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate Date Difference in Years, Months, Weeks and Days

    This could be a LOT neater with a modern Excel version. But... try the formula in the file.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: Calculate Date Difference in Years, Months, Weeks and Days

    Using DATEDIF with [Entry Date + Start Date] as Start Date and [Stop Date + Exit Date] as End Date.

    Result: 31 years, 5 months, 22 weeks & 4 days.
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,834

    Re: Calculate Date Difference in Years, Months, Weeks and Days

    Administrative Note to ALL Participants:

    Where you have provided a workbook solution, please also include a clear explanation of what you've done and how (including formulae/code as approriate) in the post in question (for the benefit of members unable to download attachments).

    This is about making your assistance accessible to all.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: Calculate Date Difference in Years, Months, Weeks and Days

    Formula for year: =DATEDIF($E$16+$E$18,$E$17+$E$19,"y")
    For month: =DATEDIF($E$16+$E$18,$E$17+$E$19,"ym")
    For week: =INT(DATEDIF($E$16+$E$18,$E$17+$E$19,"yd")/7)
    For day: =DATEDIF($E$16+$E$18,$E$17+$E$19,"yd")-G22*7

  6. #6
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Calculate Date Difference in Years, Months, Weeks and Days

    Thank You all for your Support...

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate Date Difference in Years, Months, Weeks and Days

    You're welcome. Thanks for letting us know that you got an answer.




    Please take a moment and consider clicking the "Add Reputation" button at the foot of any of the posts of anyone who helped you reach a solution here today.

+ 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. How to Calculate Date Differnce in days, weeks or months
    By carlton7372 in forum Excel General
    Replies: 5
    Last Post: 01-13-2024, 09:22 PM
  2. How to calculate date of birth by total number of Years months days
    By Ell0ll in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-28-2021, 10:03 PM
  3. RD calculation based on No.of weeks,days,months,years
    By santbiju in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-05-2016, 05:38 PM
  4. RD calculation based on No.of weeks,days,months,years
    By santbiju in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-05-2016, 07:40 AM
  5. Calculate Years, Months Weeks
    By mycon73 in forum Excel General
    Replies: 4
    Last Post: 03-02-2011, 12:02 PM
  6. Replies: 1
    Last Post: 06-29-2006, 09:30 AM
  7. difference between two dates in years, months and days.
    By ruby in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-04-2005, 12: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