+ Reply to Thread
Results 1 to 3 of 3

Need to Count how many months two different dates are apart

  1. #1
    Forum Contributor
    Join Date
    06-01-2014
    Location
    Riyadh, Saudi Arabia
    MS-Off Ver
    Microsoft 365
    Posts
    224

    Question Need to Count how many months two different dates are apart

    Hi All,

    I would like to see the possibility of counting how many months (not exact calendar months) two different dates are apart.

    E.G. 05th Jan 2019 & 01st Feb 2019 should give me an answer of 1

    I have tried the trick with DATEDIF() function but it would give me only if the date differences exceed 30 days.

    Any help is appreciated

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Need to Count how many months two different dates are apart

    Try: =(YEAR(B247)-YEAR(A247))*12+MONTH(B247)-MONTH(A247)
    Click the * to say thanks.

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Need to Count how many months two different dates are apart

    Is it correct for You:

    A
    B
    C
    1
    05 Jan 2019
    25 Feb 2019
    1
    2
    25 Jan 2019
    01 Feb 2019
    1
    3
    02 Jan 2019
    30 Mar 2019
    2
    4
    31 Jan 2019
    01 Mar 2019
    2



    A
    B
    C
    1
    05 Jan 2019
    25 Feb 2019
    =(YEAR(B1)-YEAR(A1))*12+(MONTH(B1)-MONTH(A1))
    2
    25 Jan 2019
    01 Feb 2019
    =(YEAR(B2)-YEAR(A2))*12+(MONTH(B2)-MONTH(A2))
    3
    02 Jan 2019
    30 Mar 2019
    =(YEAR(B3)-YEAR(A3))*12+(MONTH(B3)-MONTH(A3))
    4
    31 Jan 2019
    01 Mar 2019
    =(YEAR(B4)-YEAR(A4))*12+(MONTH(B4)-MONTH(A4))
    Sheet: Sheet1
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

+ 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. 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
  2. [SOLVED] Count Certain months between two dates
    By Goose0701 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-25-2015, 01:23 PM
  3. [SOLVED] Count Last Days of Months Between Two Dates
    By xybadog in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-13-2014, 10:10 AM
  4. [SOLVED] Count days and months between two dates
    By nurer in forum Excel General
    Replies: 5
    Last Post: 05-23-2012, 10:53 AM
  5. Count Months Between Dates
    By jpgoeth in forum Excel General
    Replies: 3
    Last Post: 05-31-2007, 12:17 PM
  6. How to Count Months in a Column of Dates
    By Dexsquab in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-30-2006, 03:33 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