#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default Months

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

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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)


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
3 months prior and 3 months post a date renee Excel Worksheet Functions 2 May 2nd 08 05:46 PM
Adding months to dates should account for 28-30-31 day months Graham Excel Worksheet Functions 3 February 1st 06 12:06 PM
converting months to years and months??? Marty Excel Discussion (Misc queries) 1 February 18th 05 02:38 AM
How do i change 15 months to read 1 year and 3 months? Marty Excel Discussion (Misc queries) 1 February 17th 05 11:21 PM
Dates to months and calculating values for their months jigsaw2 Excel Programming 1 September 5th 03 01:35 PM


All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"