+ Reply to Thread
Results 1 to 8 of 8

How many months from two dates

  1. #1
    Forum Contributor
    Join Date
    12-29-2014
    Location
    Indonesia
    MS-Off Ver
    Office 2010, 2013
    Posts
    125

    How many months from two dates

    Hi all,

    I want to know how many months from two dates are known using the day, date or month function assuming 1 month = 30 days.
    Please kindly help . Attachment already attached.

    thank you

    regard
    dolphino
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: How many months from two dates

    use datedif:
    =datedif(1st day of start date month,1st day of due date month,"m")+1

    Please Login or Register  to view this content.
    Quang PT

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,609

    Re: How many months from two dates

    On your sheet, you say the result should be 33 based on the count of (used cells) in c12:C44. However, Calculating the number of months from 10/31/2020 to 6/14/2023 returns 32 because you are starting from the end of the month 10/31, October is already passed...?
    Ben Van Johnson

  4. #4
    Forum Contributor
    Join Date
    12-29-2014
    Location
    Indonesia
    MS-Off Ver
    Office 2010, 2013
    Posts
    125

    Re: How many months from two dates

    dear Ben,

    yes true, it's really over the date (31 oct 20), but still the period in October 2020 I need to calculate. so the desired value is 33 months. thank you before

    regard
    dophino

  5. #5
    Forum Contributor
    Join Date
    12-29-2014
    Location
    Indonesia
    MS-Off Ver
    Office 2010, 2013
    Posts
    125

    Re: How many months from two dates

    dear bebo021999,

    thanks for the information, I can use the formula . thank you.


    Regard
    dolphino

  6. #6
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: How many months from two dates

    If DATE(y1,m1,31) to DATE(y2,m2,1) should include full months for both dates, e.g., 31 Oct 2020 to 1 Nov 2020 should be 2 months, maybe

    =DATEDIF(B5-DAY(B5),EOMONTH(B6,0),"m")

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,585

    Re: How many months from two dates

    Try this

    =(YEAR(B6)-YEAR(B5))*12+MONTH(B6)-MONTH(B5)+1
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  8. #8
    Forum Contributor
    Join Date
    12-29-2014
    Location
    Indonesia
    MS-Off Ver
    Office 2010, 2013
    Posts
    125

    Re: How many months from two dates

    dear hrlngrv

    thank you for your information, working in my file.

    regard
    dolphino

+ 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] Conditional Format - Dates greater than 18 months and 24 months
    By amandavan in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-03-2024, 04:08 PM
  2. [SOLVED] VBA code to filter pivot table by rows containing dates for dates < 60 months old
    By BrokenDome in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2019, 01:28 PM
  3. Count how many dates are this month, 2 months and 3 months old
    By jimmisavage in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-21-2017, 09:21 AM
  4. [SOLVED] Populate Dates in Other Months Based on Jan Dates
    By catnam in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2015, 08:52 AM
  5. Replies: 8
    Last Post: 02-20-2014, 05:46 PM
  6. Number of months (elapsed months) between two dates
    By Timbite in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-17-2012, 11:37 AM
  7. Adding months to dates should account for 28-30-31 day months
    By Graham in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-01-2006, 08:10 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