yee388 Well-known Member Joined Mar 7, 2004 Messages 1,374 Dec 8, 2005 #1 I have two columns of dates: 1/1/06 --- 2/10/06 12/26/05 --- 3/25/06 8/27/05 --- 9/12/05 I want a formula for the number of months spanned. so, for the above dates, Jan, Feb = 2 Dec, Jan, Feb, Mar = 4 Aug, Sept = 2 Thanks!
I have two columns of dates: 1/1/06 --- 2/10/06 12/26/05 --- 3/25/06 8/27/05 --- 9/12/05 I want a formula for the number of months spanned. so, for the above dates, Jan, Feb = 2 Dec, Jan, Feb, Mar = 4 Aug, Sept = 2 Thanks!
C colbymack Active Member Joined Jul 14, 2005 Messages 333 Dec 8, 2005 #2 Does this work for you: =((YEAR(E5)-YEAR(D5))*12)+MONTH(E5)-MONTH(D5) Where E5 has the later date, and D5 has the earlier date.
Does this work for you: =((YEAR(E5)-YEAR(D5))*12)+MONTH(E5)-MONTH(D5) Where E5 has the later date, and D5 has the earlier date.
C colbymack Active Member Joined Jul 14, 2005 Messages 333 Dec 8, 2005 #3 Sorry - you will want to add 1 at the end of that formula. I forgot that Dec to Mar =4, and not 3 (or 3.something)
Sorry - you will want to add 1 at the end of that formula. I forgot that Dec to Mar =4, and not 3 (or 3.something)
barry houdini MrExcel MVP Joined Mar 23, 2005 Messages 20,825 Dec 8, 2005 #4 perhaps =IF(LEN(A1)*LEN(B1),DATEDIF(A1,B1,"m")+1+(DAY(A1)>DAY(B1)),"")
yee388 Well-known Member Joined Mar 7, 2004 Messages 1,374 Dec 8, 2005 #5 Perfect, colbymack. I love it when it's just that simple. Barry, I haven't tried yours, but thanks for the effort.
Perfect, colbymack. I love it when it's just that simple. Barry, I haven't tried yours, but thanks for the effort.