datedif partial months??

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
 
C

Chip Pearson

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)
 
J

Jason Morin

This seems to work:

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

HTH
Jason
Atlanta, GA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top