Hi ,
I have the following dates:
31/03/2007
30/10/2006
09/12/1991
and I would like to check how many months do I have between dates, If
I use the year frac between the first and second will give 5 months
but the real value sholud be 6 . Can someone have a formula to check
this ?
Mike H - 11 Sep 2007 12:04 GMT
I think you need to look at your data again
=DATEDIF(A2,A1,"d")
Gives 152 days and
=DATEDIF(A2,A1,"m")
Gives the correct answer of 5 months between 30/10/2006 & 31/3/2007
Mike
> Hi ,
>
[quoted text clipped - 8 lines]
> but the real value sholud be 6 . Can someone have a formula to check
> this ?
David Biddulph - 11 Sep 2007 12:21 GMT
What formula are you using with YEARFRAC which you think is telling you a
number of months?
And where do you get the idea that any of those differences should be 6
months? 30/10/2006 to 31/03/2007 looks like just 1 day beyond 5 months
(subject to the usual questions as to how one defines a time in months when
different months have different lengths).
Are you looking for how many different calendar months you've got within the
period spanned by your start & finish dates? [So would you want 31st Jan to
1st Feb to say 2 months, but 1st Jan to 31st Jan to say 1 month?]
For some definitions of the period between the dates, DATEDIF may be more
suitable than YEARFRAC, but you'll need to define how you're measuring
things.

Signature
David Biddulph
> Hi ,
>
[quoted text clipped - 8 lines]
> but the real value sholud be 6 . Can someone have a formula to check
> this ?