Formula to sum the output from DATEDIF (X Years X Months X Days)

DaveBre

New Member
Joined
May 4, 2013
Messages
11
Hi all,

I'm currently using the DATEDIF formula below to work out the diffrence between two dates contained in B242 and C242.

=DATEDIF(B242,C242,"y")&" years "&DATEDIF(B242,C242,"ym")&" months "&DATEDIF(B242,C242,"md")&" days".

The output displays as X years X months X days which is fantastic for the end user reading the information.
Later in the sheet I need to sum a number of these outputs and again display that as X Years X Months X Days, but I can't get a formula to extract and sum the individual years, months and days.

Any ideas would be appreciated.

Thanks

Dave
 
cyrilbrd, thanks again. I've just tested the code and it works perfectly, I can see that I was missing the y / m / d from part of the formula.

Many Thanks

Cheers

David

Most welcome David, thanks for the feedback.
Glad it worked for you..

Cheers!
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,216,098
Messages
6,128,812
Members
449,468
Latest member
AGreen17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top