Dan
Dan

Reputation: 951

Excel formula to calculate date difference in years and months

I'm trying to come up with an Excel formula that will calculate the difference in years and months between a date in the past and today.

For example, the following tells me the number of days between a cell and now:

=INT((TODAY()-C2))

But I then need to format that value as Year and Month(s).

Obviously I'm no expert in Excel and appreciate any help!

Thanks in advance,

Dan

Upvotes: 0

Views: 2082

Answers (2)

Dan
Dan

Reputation: 951

Alas, what I did was a simple diff and got a result in year and percent, which will work fine:

=((TODAY())-(D2))/365

The DATEDIF was a total disaster, with really odd, inconsistent results.

Thanks for all the suggestions though!

Upvotes: 1

hd1
hd1

Reputation: 34677

Looking at the Microsoft Office knowledgebase, I see a YEAR function that may be used:

A1: 1-Jan-2014
A2: 4-Dec-2016
A3: =YEAR(A2)-YEAR(A1) # will yield 2

Upvotes: 0

Related Questions