#1   Report Post  
Posted to microsoft.public.excel.misc
pkeegs
 
Posts: n/a
Default Calculating months

I want to calculate calendarmonths between two dates eg finish date (A2)31
Mar 2006, start date (A1)1 Oct 2005. The answer wanted is 6 months. I am
currently using =ROUNDUP((A2-A1)/30,0). However not every month is 30 days,
and in this example the formula answer is 7. 2 Oct 2005 would give the right
answer. Similarly, 31 Jan 2006 would return 2, whereas I want it to return 3
(ie three calendar months within the date period). How can I enter the
formula which will recognise what I am trying to do.

Regards
  #2   Report Post  
Posted to microsoft.public.excel.misc
davesexcel
 
Posts: n/a
Default Calculating months


try the datedif function

=DATEDIF(A1,B1,"m")


--
davesexcel


------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=541356

  #3   Report Post  
Posted to microsoft.public.excel.misc
pkeegs
 
Posts: n/a
Default Calculating months

Thanks Dave,
DATEDIF gives the months difference, I want the months inclusive. I think I
will be able to use this function though with a bit of manipulation unless
you have another answer.
Incidentally, as a function I cannot bring up "DATEDIF" on my help screens.

"davesexcel" wrote:


try the datedif function

=DATEDIF(A1,B1,"m")


--
davesexcel


------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=541356


  #4   Report Post  
Posted to microsoft.public.excel.misc
davesexcel
 
Posts: n/a
Default Calculating months


pkeegs Wrote:
Thanks Dave,
DATEDIF gives the months difference, I want the months inclusive. I
think I
will be able to use this function though with a bit of manipulation
unless
you have another answer.
Incidentally, as a function I cannot bring up "DATEDIF" on my help
screens.


[/color]
Either can I,
it seems to be one of those secret functions


--
davesexcel


------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=541356

  #5   Report Post  
Posted to microsoft.public.excel.misc
HeyNow100
 
Posts: n/a
Default Calculating months

I have Walkenbach's Excel 2003 Bible right in front of me. He mentions
the lack of references to it in the last few versions of the Excel.
Apparently the function has its origins in Lotus123 and is still there
for compatability reasons. No idea why they still don't want to
mention it in the online help.



  #6   Report Post  
Posted to microsoft.public.excel.misc
pkeegs
 
Posts: n/a
Default Calculating months

My simple answer to have the inclusive number of months is to add 1 at the
end of the formula and it is working well, hence =DATEDIF(A1,B1,"m")+1

Thanks & regards (Interesting about the lack of help on the function)

"davesexcel" wrote:


try the datedif function

=DATEDIF(A1,B1,"m")


--
davesexcel


------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=541356


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
What is the formula for calculating the number of months passed? Teri Excel Worksheet Functions 5 March 9th 06 02:05 AM
Calculating by individual months of the year Maddoktor Excel Discussion (Misc queries) 3 February 8th 06 08:55 PM
Calculating an Activities During Periods Of Natural Months and/or Dates Rayco Excel Worksheet Functions 1 October 10th 05 01:30 PM
Calculating Dates in Terms of Months Jessica Excel Worksheet Functions 4 September 20th 05 06:35 PM
calculating number of months from today JNW Excel Worksheet Functions 5 September 15th 05 10:01 PM


All times are GMT +1. The time now is 02:09 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"