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

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

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

Try: =(YEAR(B247)-YEAR(A247))*12+MONTH(B247)-MONTH(A247)  Register To Reply

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

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