#1   Report Post  
Claudine
 
Posts: n/a
Default Dates

hello. what's my formula if I want to get the number of months from let's
say 4/15/2005 to 4/30/2006? I know I can simply do a (4/30/06 less 4/15/05)
divided by 30. But that comes out as 12.66666. What's the best formula?

Thank you very much!
Claudine
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

With a date in B2 this formula give you the completed months between
B2 and today(you can use another cell also)

=IF(B2<=TODAY(),DATEDIF(B2,TODAY(),"m"),-DATEDIF(TODAY(),B2,"m"))

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Claudine" wrote in message ...
hello. what's my formula if I want to get the number of months from let's
say 4/15/2005 to 4/30/2006? I know I can simply do a (4/30/06 less 4/15/05)
divided by 30. But that comes out as 12.66666. What's the best formula?

Thank you very much!
Claudine



  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Thu, 26 May 2005 14:09:40 -0700, "Claudine"
wrote:

hello. what's my formula if I want to get the number of months from let's
say 4/15/2005 to 4/30/2006? I know I can simply do a (4/30/06 less 4/15/05)
divided by 30. But that comes out as 12.66666. What's the best formula?

Thank you very much!
Claudine


What do *you* mean by "best".

Since months (and years) do not all have the same number of days, you need to
decide how you want to handle all sorts of irregularities.

In your example above, the result is fairly simple at 12 months (and 15 days).

But take, for example, 1/29/2005 2/28/2005

de Bruins formula will give a result of "0" months, because of assumptions
within the DATEDIF formula.

I would think a result of 1 month 2 days would be appropriate. But you might
want 1 2/28 or 1 1/14 months.

One convention would be to count full calendar months, and then either
fractional months or the actual days for the first and last months. This might
lead to a result of 11 months 45 days, though.

Another way could be to do full calendar months, but then compute the
fractional months taking into account the numbers of days in the beginning and
ending months.

It's up to you to define how you want to handle these instances.


--ron
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
Stop Excel Rounding Dates leinad512 Excel Discussion (Misc queries) 1 April 20th 05 04:19 PM
How do I get Excell to sort dates that range from 1800 to 1900's Smith295 New Users to Excel 1 February 22nd 05 06:20 PM
How sort dates just by day/month and NOT year if all 3 given in ce smags Excel Worksheet Functions 1 January 25th 05 03:45 AM
Formating Dates for production schedule dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 08:43 PM
due dates Niki New Users to Excel 4 January 10th 05 04:11 PM


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