Number of Completed Months

R

Rick

Hi,

How can I get the number of COMPLETED months returned between 2 dates?

At times it may be grater than 12 months - but never greater than 24
months.

I've been fiddling with =Floor and =Ceiling but when the dates are in
a different year it has me stumped. For example ...

A1 = 15-Jun-07
A2 = 23-Oct-08

Need a formula to return "15" months

Tks, Kaye
 
B

Bob Phillips

=DATEDIF(A1,A2,"M")

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
R

RichardSchollar

Hi

Try this - it can probably be simplified further:

=DATEDIF(A1,A2,"m")-(DAY(A1)<DAY(A2))+(DAY(A1)=1)+
(DATE(YEAR(A2),MONTH(A2)+1,0)=A2)

Richard
 

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

Top