Summary of Difference between dates in years, months, days

M

mardoh

I need to calculate the difference between 2 dates and then total them.
Here's what I have so far:

From To Length of
Service
01/09/2003 31/01/2010 6y 4m 30d
01/06/2000 30/11/2002 2y 5m 29d
Total of Service: ??????????

I've used the following formula to calculate the total days worked:
=DATEDIF(A4,B4,"Y")&"y "&DATEDIF(A4,B4,"ym")&"m "&DATEDIF(A4,B4,"md")&"d"

Problem is I don't know how to add the two together to get the total length
of service.

Thanks
 
N

Niek Otten

=DATEDIF(1,B2-A2+B3-A3,"y")&"y "&DATEDIF(1,B2-A2+B3-A3,"ym")&"m
"&DATEDIF(1,B2-A2+B3-A3,"md")&"d"

Depending on how you define length you may have to add 1 to the date
difference (or to one of the dates)
Of course the formula can be shortened by using an intermediate cell for
B2-A2+B3-B2
 
M

mardoh

Much appreciated Niek.
Thank you.

Niek Otten said:
=DATEDIF(1,B2-A2+B3-A3,"y")&"y "&DATEDIF(1,B2-A2+B3-A3,"ym")&"m
"&DATEDIF(1,B2-A2+B3-A3,"md")&"d"

Depending on how you define length you may have to add 1 to the date
difference (or to one of the dates)
Of course the formula can be shortened by using an intermediate cell for
B2-A2+B3-B2

--
Kind regards,

Niek Otten
Microsoft MVP - Excel
 

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