+ Reply to Thread
Results 1 to 6 of 6

Find number of months between two dates

  1. #1
    Forum Contributor
    Join Date
    06-05-2014
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    155

    Find number of months between two dates

    hi Team,

    i have coloumn A and B with list of dates. Coloumn A has earlier dates when compared to coloumn B.
    i am trying to find a formula with which i can know the difference between the dates in "number of months".

    Ex: Coloumn A has 06/01/2014 and Column B has 08/30/2014. The difference between the dates in terms of month is 3 which i need in a formula.

    Please help.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Find number of months between two dates

    http://office.microsoft.com/en-gb/ex...003056111.aspx

    Looking at your example, I would say there is two months difference between those dates, which I think is what the formula in the link would return. Maybe you could change it to:
    =(YEAR(B1)-YEAR(A1-1))*12+MONTH(B1)-MONTH(A1-1)
    Assuming that your dates are always the first and last of a month.

  3. #3
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Find number of months between two dates

    hi,

    Try this formula
    =ROUNDUP((B1-A1)/30.5,0)

    Punnam

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Find number of months between two dates

    try =DATEDIF(A1,B1,"m") for date difference in months or =DATEDIF(A1,B1,"ym") for a difference between the months by month only. The first will give you the total months difference so 8/11 and 6/14 is 34 using the first, it is 10 using the second. The first uses months and years and the second uses months only.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  5. #5
    Forum Contributor
    Join Date
    06-05-2014
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    155

    Re: Find number of months between two dates

    The formula works perfectely fine but i didnot understand the difference between =DATEDIF(A1,B1,"m") and =DATEDIF(A1,B1,"ym").

    Can you explain in detail please.

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Find number of months between two dates

    let's say that your months are 5/1/2011 and 6/15/2014, for the first (using "m") will give you the total # of months between the two dates, in this case 37 months. Now the second using "ym" will give you the total months ignoring the year values so you would get 1 - one month difference between May and June whereas the first would give you 37 months difference between May 2011 and June 2014. The first is months difference taking into account years while the second ignors years and only looks at months (seems backwards doesn't it?).

+ 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] Number of whole months between two dates
    By tiggynook in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-07-2014, 01:45 PM
  2. Replies: 8
    Last Post: 02-20-2014, 05:46 PM
  3. 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
  4. number of months between two dates
    By baz0912 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-24-2008, 04:23 PM
  5. Number of months between 2 dates
    By john liem in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 05-31-2005, 06:05 PM

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