datedif partial months??

  • Thread starter Thread starter josh ashcraft
  • Start date Start date
J

josh ashcraft

I'm using datedif to calculate the amount of months
between two dates, and if the month is not a full month, i
need to know how many days are left, and put that in a
separate cell, is this possible?
example- 5/1/03 to 8/15/04, 15 months and 15 days, and i
need to be able to see the the extra 15 days as days in a
separate cell.
thanks in advance,
josh
 
Josh,

The "md" argument to DATEDIF will return the number of days within
a calendar month, ignoring months and years. In your example, the
formula

=DATEDIF(A1,A2,"md")

will return 14 since there are 14 days between the 1st and 15th of
the month. Add 1 to get 15.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 
This seems to work:

=DATEDIF(A1,A2,"m")&" months "&A2-EOMONTH(A2,-1)-1&" days"

HTH
Jason
Atlanta, GA
 
Back
Top