Month Counter
Does anyone know how to count months between two dates. I want to be able to
go beyond 12 months. 01/01/2005 - 01/01/2004 = 13 months. Month(Date2)- Month(Date1) = will only give me answers from 1 to 12 I was originally using the formula : INT(Date2-Date1/28). But this does not hold longer term. This formula works but is ugly: Month(Date2)-Month(Date1)*12(Year(Date2)-Year(Date1)) Any thoughts on a simpler formula would be appreciated |
Hi
=DATEDIF(Date1, Date2, "M") (but there may be minor problems with some date combinations) -- Arvi Laanemets ( My real mail address: arvil<attarkon.ee ) "ExcelMonkey" wrote in message ... Does anyone know how to count months between two dates. I want to be able to go beyond 12 months. 01/01/2005 - 01/01/2004 = 13 months. Month(Date2)- Month(Date1) = will only give me answers from 1 to 12 I was originally using the formula : INT(Date2-Date1/28). But this does not hold longer term. This formula works but is ugly: Month(Date2)-Month(Date1)*12(Year(Date2)-Year(Date1)) Any thoughts on a simpler formula would be appreciated |
Try this formula:
=12*(YEAR(A2)-YEAR(A1))+(MONTH(A2)-MONTH(A1)) Pip pip Zorba Eisenhower ExcelMonkey wrote: Does anyone know how to count months between two dates. I want to be able to go beyond 12 months. 01/01/2005 - 01/01/2004 = 13 months. Month(Date2)- Month(Date1) = will only give me answers from 1 to 12 I was originally using the formula : INT(Date2-Date1/28). But this does not hold longer term. This formula works but is ugly: Month(Date2)-Month(Date1)*12(Year(Date2)-Year(Date1)) Any thoughts on a simpler formula would be appreciated |
All times are GMT +1. The time now is 03:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com