Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop Excel Rounding Dates | Excel Discussion (Misc queries) | |||
How do I get Excell to sort dates that range from 1800 to 1900's | New Users to Excel | |||
How sort dates just by day/month and NOT year if all 3 given in ce | Excel Worksheet Functions | |||
Formating Dates for production schedule | Excel Discussion (Misc queries) | |||
due dates | New Users to Excel |