Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What Excel formula caluclates number of months between two dates?

8 views
Skip to first unread message

kk

unread,
Jun 26, 2007, 10:46:01 AM6/26/07
to
I want to calculate the number of months between two dates that show in the
format, 11-Jan-07.
HELP Please!

Bernard Liengme

unread,
Jun 26, 2007, 10:58:25 AM6/26/07
to
This reply is adopted from Chips' page - see
http://www.cpearson.com/excel/datedif.htm

=DATEDIF(Date1,Date2,"m") where

Date1 is the first date, in standard Excel serial-date format.
Date2 is the second date, in standard Excel serial-date format.


best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email


"kk" <k...@discussions.microsoft.com> wrote in message
news:D0D9A0A7-B528-45FE...@microsoft.com...

Dave Peterson

unread,
Jun 26, 2007, 10:59:32 AM6/26/07
to
Chip Pearson has some very nice notes:
http://www.cpearson.com/excel/datedif.htm

--

Dave Peterson

kk

unread,
Jun 26, 2007, 11:22:02 AM6/26/07
to
Thank you! That works perfectly...one other problem. I want it to stop
rounding the number up or down. I want it to be like this for example:
My 2 dates are 27-Nov-06 19-Nov-08 = 23.78 this is a result from
another system we have. But I'm creating a spreadsheet that we will use
instead so I need it to automatically calculate without rounding.
Thanks!

Rick Rothstein (MVP - VB)

unread,
Jun 26, 2007, 11:45:36 AM6/26/07
to
> Thank you! That works perfectly...one other problem. I want it to stop
> rounding the number up or down. I want it to be like this for example:
> My 2 dates are 27-Nov-06 19-Nov-08 = 23.78 this is a result from
> another system we have. But I'm creating a spreadsheet that we will use
> instead so I need it to automatically calculate without rounding.

DATEDIF will not calculate fractions of a month... whole number of months
only. If you think about it, though, 0.78 months is a meaningless measure
because the fraction will depend on the number of days and which months are
spanned by them (45 days across February would produce a different fraction
part of a month than 45 days across July). Besides, what is it 0.78 of? That
0.78 would represent 24.18 days if applied to January, but only 21.84 days
if applied to February.

Rick

0 new messages