+ Reply to Thread
Results 1 to 4 of 4

formula to calculate months in a specific year given a multi-year range

  1. #1
    Registered User
    Join Date
    03-11-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    2

    formula to calculate months in a specific year given a multi-year range

    Hello,

    I'm hoping someone can help me out with this. I'm trying to calculate the number of months in a specific year, given a multi-year range. For example, given a range of May 2008 - October 2010, I would like to create a formula that calculates the number of months in 2008, 2009, and 2010. I tried playing around with the DATEDIF function but I'm stuck!! Anyone out there that can help me? Thanks!

  2. #2
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421

    Re: formula to calculate months in a specific year given a multi-year range

    Try this:

    Please Login or Register  to view this content.
    A3 and A4 have the two dates. The one factor would be that A3 has to be the earlier date of the two.

    Hope that helps..

    GWB
    I help because of the Pavlovian dog that resides in the inner me...so if you are happy with the results, please add to my reputation. It helps keep me motivated!



    Please mark your threads as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: formula to calculate months in a specific year given a multi-year range

    That just gives you an answer of how many months total. The formula:

    =DATEDIF(A3,A4,"m")

    ..will do that, too. The OP is looking for a breakout of that total months number into individual years.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    03-11-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: formula to calculate months in a specific year given a multi-year range

    This is what I have so far...
    Attached Files Attached Files

+ 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