+ Reply to Thread
Results 1 to 4 of 4

Identify Months Between Two Dates with Decimal Points

  1. #1
    Registered User
    Join Date
    07-06-2016
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    28

    Identify Months Between Two Dates with Decimal Points

    Hi! I'm looking for a formula that will compare the months between two dates and provide an answer with decimal points. I'm currently using DATEDIF, but it's giving me whole months which can be a little misleading (i.e. Jan 15 2018 and March 14 2018 is returning a 1).

    Any help is appreciated!!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Identify Months Between Two Dates with Decimal Points

    Hi

    DateDif by default always rounds down. What should the answer be? And how do you calculate the decimal when start and end months contain different numbers of days.

    Did you look at this similar thread

    https://www.excelforum.com/excel-for...a-decimal.html
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    07-06-2016
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    28

    Re: Identify Months Between Two Dates with Decimal Points

    Yes, I have - I was hoping there's an easier solution in just getting the datedif to return a decimal number. I'm working with a large data set that feeds into a report and the formulas on that thread were quite large.

    Is it possible to do something where if it's 16+ days more than the whole month it rounds up, less than it rounds down? So for example, comparing 03/05/2018 to 04/21/2018 would round up to 2 months, comparing 03/05/2018 to 04/20/2018 would round down to 1 month.

  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
    52,926

    Re: Identify Months Between Two Dates with Decimal Points

    Maybe this work-around will help.

    Assume start date is L1, end date is M1...
    =DATEDIF(L1,IF(DATEDIF(L1,M1,"md")<16,M1,EDATE(M1,1)),"ym")
    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

+ 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. counting months between dates and returning a decimal
    By Mycotopian in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 09-12-2023, 01:09 AM
  2. Trying to identify decimal
    By kmakjop in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-09-2015, 03:03 PM
  3. Replies: 8
    Last Post: 02-20-2014, 05:46 PM
  4. Replies: 2
    Last Post: 10-03-2012, 03:38 PM
  5. decimal points
    By Stiffy in forum Excel General
    Replies: 1
    Last Post: 03-17-2009, 07:40 AM
  6. [SOLVED] Decimal Points
    By Leanne in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM

Tags for this Thread

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