+ Reply to Thread
Results 1 to 10 of 10

Finding Months Between Two Dates

  1. #1
    Registered User
    Join Date
    01-16-2013
    Location
    Oklahoma City, OK
    MS-Off Ver
    Excel 2010
    Posts
    40

    Finding Months Between Two Dates

    Hello All,

    I need help finding a formula to calculate the number of months between two dates. I've attached an Excel spreadsheet with sample data. Some are in the future, and some are in the past.

    Excel Help.xlsx

    I appreciate everyone's help.

    Jen

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Finding Months Between Two Dates

    We need a definition of what qualifies a month to be counted.
    If the End date is the first of the month, should that month be counted?
    Or if the Begin date is the last day of the month, should that month be counted?
    Or should a month only be counted if it passes in it's entirety?

    Can you manually enter your expected results into column C and repost the book?

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Finding Months Between Two Dates

    See if this will work for you

    =DATEDIF(A2,B2,"m")

    A
    B
    C
    1
    Date One Date Two Months Between
    2
    7/15/2010
    9/13/2012
    25
    3
    6/13/2011
    10/1/2013
    27
    4
    5/11/2012
    10/19/2014
    29
    5
    4/9/2013
    11/6/2015
    30
    6
    3/8/2014
    11/23/2016
    32
    7
    2/4/2015
    12/11/2017
    34
    8
    1/3/2016
    12/29/2018
    35
    9
    12/1/2016
    1/16/2020
    37
    10
    10/30/2017
    2/2/2021
    39
    11
    9/28/2018
    2/20/2022
    40
    12
    8/27/2019
    3/10/2023
    42
    13
    7/25/2020
    3/27/2024
    44
    14
    6/23/2021
    4/14/2025
    45
    15
    5/22/2022
    5/2/2026
    47
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    01-16-2013
    Location
    Oklahoma City, OK
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Finding Months Between Two Dates

    Can you manually enter your expected results into column C and repost the book?
    Okay, I've attached a book with the first 3 calculated as to what I'm hoping to find.

    We need a definition of what qualifies a month to be counted.
    Literally just moving from one month to the next, I'm not looking for exact 30/31 days. Just from November to December, etc.

    If the End date is the first of the month, should that month be counted?
    No, I only need the next month to count.

    Or if the Begin date is the last day of the month, should that month be counted?
    Yes, I still need to account for that month.

    Or should a month only be counted if it passes in it's entirety?
    No. I'm just looking for how many calendar months are between the two.

    Excel Help.xlsx

    I hope this helps.

  5. #5
    Registered User
    Join Date
    01-16-2013
    Location
    Oklahoma City, OK
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Finding Months Between Two Dates

    See if this will work for you

    =DATEDIF(A2,B2,"m")
    It worked like a dream, thank you very much!

    Reputation added

  6. #6
    Registered User
    Join Date
    11-20-2013
    Location
    Milan, OH
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Finding Months Between Two Dates

    Is this what you're looking for? Excel Help.xlsx This is based on the average number of days in a month (accounting for leap years). It's simply column B minus column A all divided by said average. Hope this helps!!

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Finding Months Between Two Dates

    Thank you for feedback!

  8. #8
    Registered User
    Join Date
    01-16-2013
    Location
    Oklahoma City, OK
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Finding Months Between Two Dates

    BNUll, that works even better, thank you!

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Finding Months Between Two Dates

    Nevermind, appears you already have solution.

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Finding Months Between Two Dates

    If these were the dates:

    A2 = 11/30/2012

    B2 = 12/1/2013

    What result would you expect? If you expect the result to be 2, then try this formula:

    =DATEDIF(A2-DAY(A2)+1,B2,"m")+1
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Finding the average re-order date in terms of months
    By sanjay.wagjiani in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-10-2013, 11:31 AM
  3. [SOLVED] Finding Mismatched Months
    By Tim Kennedy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-03-2013, 09:48 AM
  4. 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
  5. 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

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