Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Number of Months Counts

Would like to know the function that returns the number of months, for
example to return 20 for the months from Feb-2008 to Sep-2009.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Number of Months Counts

Have a look at DATEDIF. This is undocumented but Chip tells all at
www.cpearson.com
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Jalal" wrote in message
...
Would like to know the function that returns the number of months, for
example to return 20 for the months from Feb-2008 to Sep-2009.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Number of Months Counts

And if you weren't aware of the DATEDIF function that Bernard referred you
to, you could always do it the long way...

=12*(YEAR(B10)-YEAR(A10))+MONTH(B10)-MONTH(A10)+1

where it is assumed your begin date is in A1 and your end date is in B1.

Rick


"Jalal" wrote in message
...
Would like to know the function that returns the number of months, for
example to return 20 for the months from Feb-2008 to Sep-2009.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Number of Months Counts

Thanks guys.

"Rick Rothstein (MVP - VB)" wrote:

And if you weren't aware of the DATEDIF function that Bernard referred you
to, you could always do it the long way...

=12*(YEAR(B10)-YEAR(A10))+MONTH(B10)-MONTH(A10)+1

where it is assumed your begin date is in A1 and your end date is in B1.

Rick


"Jalal" wrote in message
...
Would like to know the function that returns the number of months, for
example to return 20 for the months from Feb-2008 to Sep-2009.



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
Number counts within Date Range SteveStats Excel Worksheet Functions 2 October 27th 07 04:32 AM
Month name to number of months YTD Tasha Excel Worksheet Functions 7 July 26th 07 09:55 PM
A macro that counts the number of times a file is opened [email protected] Excel Discussion (Misc queries) 2 December 20th 06 01:53 PM
a function that counts the number of cells with information zuri125 Excel Worksheet Functions 1 June 7th 06 07:37 AM
how do I convert a number to number of years, months and days because Excel Worksheet Functions 2 October 12th 05 06:15 PM


All times are GMT +1. The time now is 12:22 PM.

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

About Us

"It's about Microsoft Excel"