Months between dates - round up

  • Thread starter Thread starter xlclue
  • Start date Start date
X

xlclue

How do I return the number of partial (and full) months between dates
for example, between 1/9/2004 and 5/20/2004? Answer should be
months.

In other words, two dates 5 days apart within or across months mus
round up to 1 month. 4 months, 2 days must round up to 5 months.
1/9/2004 and 1/15/2004 would result in 1 month. Excel 2000.

(Using DATEDIF hasn’t worked for me yet since it appears to return onl
full months between dates.)

Thanks
 
Hi xlclue!

One way:

=DATEDIF(A1,B1,"m")+(DATEDIF(A1,B1,"md")>0)

The second part acts the same as an IF function and a return of TRUE
gets coerced by the maths to 1.
 
Back
Top