Work with dates

Count full months or years between dates

=DATEDIF(A2,B2,"m")

How it works in Excel

The idea in general

It counts only completed months or years, the way a birthday only counts once it has passed.

What I assumed

Check the result on your own data before relying on it.

Related

Ask another question