+ Reply to Thread
Results 1 to 9 of 9

Calculating months between two dates

  1. #1
    Registered User
    Join Date
    04-22-2022
    Location
    Scotland
    MS-Off Ver
    365
    Posts
    4

    Calculating months between two dates

    According to a vendors contract they have stipulated the months between two dates, however, when I try and calculate this I can't match to their numbers. For example:

    08-FEB-21 to 13-JUL-21 = 5.15 months
    14-JUL-21 to 30-NOV-23 = 28.60 months
    01-DEC-23 to 30-AUG-24 = 9.02 months
    31-AUG-24 to 02-JUN-25 = 9.05 months
    03-JUN-25 to 02-JUL-25 = 1 month
    03-JUL-25 to 09-AUG-25 = 1.25 months

    I've tried numerous formulas for month, year, fractions, etc to try and come out at their figures but I'm not getting it to match. The closest I get is 5.13, 28.6, 9.01, 9.07, 0.99, 1.25 using =(End Date-StartDate+1)/(365/12). Some of them match but others don't and I need all of them to match according to the contract.

    Any suggestions/help?
    Attached Files Attached Files
    Last edited by lguest; 02-29-2024 at 10:06 AM. Reason: Addition of Sample Workbook

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Calculating months between two dates

    have you asked the vendor how they do the calculations

    perhaps they round up somehow , or dont do it exactly anyway

    i'll try and get into a sheet

    A sample sheet would help here, and possibly will enable a quicker and more accurate solution for you.


    The forum does allow for spreadsheets to be uploaded direct to the forum -

    Please see the Yellow Banner at the top of the page explaining how to attach a sample spreadsheet

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

    Here are the instructions, found at the top of the page again
    HOW TO ATTACH YOUR SAMPLE WORKBOOK:, Fast answers need clear examples. Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    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,897

    Re: Calculating months between two dates

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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.

  4. #4
    Registered User
    Join Date
    04-22-2022
    Location
    Scotland
    MS-Off Ver
    365
    Posts
    4

    Re: Calculating months between two dates

    Apologies I've uploaded a sample workbook.

    Yes have asked the vendor but still waiting for a reply.

  5. #5
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,294

    Re: Calculating months between two dates

    Power Query
    Please Login or Register  to view this content.
    And formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Czeslaw; 02-29-2024 at 10:32 AM.

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Calculating months between two dates

    not sure - sorry
    i have used
    =DATEDIF(A2,B2,"M")&" months "&DATEDIF(A2,B2,"MD")&" days"
    to get months and days
    not sure how you would do a fraction of a month ....... to be honest - maybe use 31 days ,
    BUT i dont get a match

    1.25
    i get 1 months 6 days
    so not 1/4 of a month

    maybe other member can see how - i dont know
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-22-2022
    Location
    Scotland
    MS-Off Ver
    365
    Posts
    4

    Re: Calculating months between two dates

    Thank you for this but it's not matching the contract months. It needs to match their months.

  8. #8
    Registered User
    Join Date
    04-22-2022
    Location
    Scotland
    MS-Off Ver
    365
    Posts
    4

    Re: Calculating months between two dates

    Thank you for trying

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Calculating months between two dates

    you are welcome

+ 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. Calculating Dates Between Months
    By BizProcessGuy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-28-2017, 09:50 AM
  2. [SOLVED] calculating total months from 2 different dates
    By masonutley in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-02-2015, 06:39 PM
  3. [SOLVED] Calculating Number of Months between two given dates
    By InterstateRentals in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-09-2013, 10:15 AM
  4. Replies: 1
    Last Post: 07-28-2011, 04:58 AM
  5. calculating difference in months between 2 dates
    By RealEstateFinan in forum Excel General
    Replies: 3
    Last Post: 07-11-2007, 03:15 PM
  6. Calculating # of Months B/T Dates
    By S Jackson in forum Excel General
    Replies: 5
    Last Post: 02-01-2006, 05:40 AM
  7. Calculating Dates in Terms of Months
    By Jessica in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-20-2005, 02:05 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