Dave F said:
So how do I get Excel to determine that 3/31/2006 and
4/30/2006 are, in fact,
a month apart?
Dave
DATEDIF is very much an orphan function, see
http://www.cpearson.com/excel/datedif.htm
I was rather taken with Pearson's description:
"DATEDIF has, for whatever reason, been treated as one of the
drunk cousins of the Function Family. Excel knows he lives a
happy and useful existence, and will acknowledge his existence
when you ask, but will never mention him in "polite"
conversation."
http://www.cpearson.com/excel/datedif.htm
I was rather taken with Pearson's description:
"DATEDIF has, for whatever reason, been treated as one of the
drunk cousins of the Function Family. Excel knows he lives a
happy and useful existence, and will acknowledge his existence
when you ask, but will never mention him in "polite"
conversation."
The problem seems to arise in this case because DATEDIF decides
the length of a month on a basis of the first variable and this
leads to problems when the month of the first variable is longer
than that of the second. As far as I can tell, there is no
problem if you change the formula to say
=DATEDIF(A1,B1+2, "m")
This seems to work during leap years and the added 2 does not
invalidate the returned integer.
It's a bit late at night, so I will not be totally surprised if
someone comes up with a contrary answer