+ Reply to Thread
Results 1 to 4 of 4

Count Months Between Dates

  1. #1
    Registered User
    Join Date
    02-28-2007
    Posts
    29

    Count Months Between Dates

    I need a formula to count the number of moths between two dates. I tried formatting the dates as numbers and then subtrating them and then formatting the results as mm (with the custum format), but that only works if the dates are in the same year.

    I also found this

    Please Login or Register  to view this content.
    on the Microsoft website. It returns "1 years, 1 months, 1 days" for the difference between 10/16/05 and 10/15/04 which is great, but what I need is something that will return "13".

    That last thing that I tried is =DATEDIF(start_date,end_date,unit) with the unit as M and it returned "01".

    Suggestions?
    Last edited by jpgoeth; 05-31-2007 at 11:32 AM.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444
    Hi,

    If your two dates are in A1 and B1,

    =ROUND((B1-A1)/30.4,0) formatted as "general" will return the number of months
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    02-28-2007
    Posts
    29

    Thumbs up Thanks

    Looks good!

    I was really stuck on using some sort of date function and couldn't think of anything else to do.

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444
    Wood for the trees - I know exactly what you mean!

+ 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