ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Months (https://www.excelbanter.com/excel-programming/341132-months.html)

Bill[_30_]

Months
 
Hello,
Is there are easy way to tell the number of months between two dates (such
as Mar-2003 and June-2005).

Thanks.



Tom Ogilvy

Months
 
In VBA, look at the DateDiff function.

--
Regards,
Tom Ogilvy


"Bill" wrote in message
nk.net...
Hello,
Is there are easy way to tell the number of months between two dates (such
as Mar-2003 and June-2005).

Thanks.





Nick Hebb

Months
 
=(year(second date)-year(first date))*12+(month(second
date)-month(first date))

Substitute real dates for the 'first date" and "second date", of
course.

----

Nick Hebb
BreezeTree Software
http://www.breezetree.com


Kenneth Hobson

Months
 
You could write a function for it or use what the help gives as an example.

=(YEAR(A4)-YEAR(A3))*12+MONTH(A4)-MONTH(A3)



Dave Peterson

Months
 
You can find lots of info at Chip Pearson's site:
http://www.cpearson.com/excel/datedif.htm

(=datedif() was only documented in xl2k's help.)

Bill wrote:

Hello,
Is there are easy way to tell the number of months between two dates (such
as Mar-2003 and June-2005).

Thanks.


--

Dave Peterson


All times are GMT +1. The time now is 05:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com