Thread: DATEDIF?
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default DATEDIF?

You can use a formula like

=DATEDIF(A1,B1,"m")+(B1-DATE(YEAR(B1),MONTH(B1),1))/DAY(DATE(YEAR(B1),MONTH(B1)+1,0))

where the start date is in A1 and the end date is in B1. The integer
portion of the result is the number of whole months between the two
dates. The fractional portion is the day of the end date divided by
the number of days in the end month. The same day of month for
different months will return different values, since a month can have
anywhere from 28 to 31 days. The whole idea of a "fraction of a month"
is a bit slippery and open to interpretation.

For example, if the end date is the 20th of the month, the fractional
portion will be 0.61 if the month has 31 days, 0.68 if the month has
28 days, and 0.63 if the month has 30 days. Take you pick as to which
is the "correct" answer.



Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Wed, 18 Mar 2009 13:36:52 -0700, Ken
wrote:

Excel2003 ...

I need to determine fractional MONTHS between 2 Dates to 1 decimal place
(17.3 months). DATEDIF is returning whole number of months which I cannot
seem to format to 1 decimal place.

How can you help me? ... Thanks ... Kha