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

1. ## 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!  Register To Reply

2. ## 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  Register To Reply

3. ## 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.  Register To Reply

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

This is what I have so far...  Register To Reply