Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default Calculate # of months if a date is given

"Fred Smith" wrote:
Try:
=datedif(a1,min(b1,date(year(a1),12,31)),"m")


Result is 0 for start 12/1/2010, end 1/1/2011. Shouldn't that be 1?

Result is 0 for start 10/31/2010, end 11/30/2010. Not clear what answer
"LP" would like in that case.

Result is 8 for start 3/2/2010, end 12/1/2010. As I noted, some people
might want 9. Not clear what "LP" wants.


----- original message -----

"Fred Smith" wrote in message
...
Try:

=datedif(a1,min(b1,date(year(a1),12,31)),"m")

Regards,
Fred.

"LP" wrote in message
...
I have 2 columns with date range. A1 is start date of 3/1/2010 and
B1 end date of 3/1/2011. Is there a way to show the number of months
ONLY in 2010? I realized the question has been asked before but I
believe it's to calculate the number of months between the 2 dates.
This is specific to the year I want. Thanks.



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
calculate number of months based on one date JK Excel Discussion (Misc queries) 1 March 5th 09 05:51 PM
About calculate months between two date (date function) Hank Excel Discussion (Misc queries) 2 February 2nd 07 05:42 PM
HOW DO I CALCULATE THE YEARS MONTHS AND DAYS BETWEEN SEVERAL DATE Susan Excel Discussion (Misc queries) 1 June 29th 06 02:27 PM
Most simple formula to calculate date+ 30 months? KR Excel Worksheet Functions 4 September 28th 05 07:57 PM
calculate date differences in years and months Joyce Excel Worksheet Functions 1 March 14th 05 05:18 PM


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

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"