Month (datedif) to 1 decimal

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello! Is there a way to calc the # of months between dates to 1 decimal
place? Other than taking the difference between 2 dates and dividing by 30.

Thanks!
 
DATEDIF can calculate the number of whole months, like so

=DATEDIF(A21,B21,"M")

there is no way that I now of to get to one decimal place because of the
different number of days in each month the algorithm is somewhat tricky. You
could do an approximation with

=DATEDIF(A21,B21,"YM")+DATEDIF(A21,B21,"MD")/30

which is a little better than (B21-A21)/30


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Hi Jennifer,
Try this
=YEARFRAC(C8,G8)*12

C8 and G8 being the cells with the two dates. Format cell to 1 decimal place
as required.
 

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

Back
Top