+ Reply to Thread
Results 1 to 4 of 4

calculating difference in months between 2 dates

  1. #1
    Registered User
    Join Date
    07-11-2007
    Posts
    22

    calculating difference in months between 2 dates

    Experts,

    I am trying to calculate the difference (in months) between two dates INCLUSIVE of both dates. I have a formula, but it doesn't work properly all the time.

    Here is when it works properly:

    DATE 1: 8/31/07 (Cell G49)
    DATE 2: 12/31/10 (Cell I49)
    FORMULA: =+DATEDIF(G49,I49,"m")+1
    RESULT: 41 months *CORRECT*

    Here is when it doesn't work properly:

    DATE 1: 8/31/07 (Cell G49)
    DATE 2: 2/28/11 (Cell I49)
    FORMULA: =+DATEDIF(G49,I49,"m")+1
    RESULT: 42 months *INCORRECT* =>should be 43 months

    I can't figure this out. Any help would be much appreciated. Thanks!

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    See if this works:

    =DATEDIF(G49,I49,"m")+IF(DAY(G49)>DAY(I49),2,1)

    HTH

    Jason

  3. #3
    Registered User
    Join Date
    07-11-2007
    Posts
    22
    Jason,

    I believe your formula works. Thank you very much for the assistance!

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    No problem.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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