Adding multiple date ranges

Viswa88

New Member
Joined
Mar 25, 2022
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
How to add multiple date ranges to find the total time period in number of years , months and days

4/12/2015 to 6/2/2019 = 4 years,1 months,21 days
9/8/2010 to 1/8/2012 = 1 years,4 months,0 days
5/3/2007 to 3/4/2008 = 0 years,10 months,1 days
3/5/2004 to 4/3/2006 = 1 years,10 months,1 days
----------------------------------------------------------------
total = ??????
new.xlsx
ABC
1fromto
24/12/20156/2/20194 years,1 months,21 days
39/8/20101/8/20121 years,4 months,0 days
45/3/20073/4/20080 years,10 months,1 days
503/05/200204/03/20063 years,10 months,1 days
6total ?????
Sheet1
Cell Formulas
RangeFormula
C2:C5C2=DATEDIF(A2,B2,"y") &" years,"&DATEDIF(A2,B2,"ym") &" months," &DATEDIF(A2,B2,"md") &" days"
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
In an unused cell, AA1 say, enter 01/01/1900
Then in AA2 enter =sum(B2:B5)-sum(A2:a5)
C6 is then
Excel Formula:
=DATEDIF(AA1,AA2,"y") &" years,"&DATEDIF(AA1,AA2,"ym") &" months," &DATEDIF(AA1,AA2,"md") &" days"
( you can of course enter the two values directly in the formula, but that makes it quite long to edit...
 
Upvote 0
In an unused cell, AA1 say, enter 01/01/1900
Then in AA2 enter =sum(B2:B5)-sum(A2:a5)
C6 is then
Excel Formula:
=DATEDIF(AA1,AA2,"y") &" years,"&DATEDIF(AA1,AA2,"ym") &" months," &DATEDIF(AA1,AA2,"md") &" days"
( you can of course enter the two values directly in the formula, but that makes it quite long to edit...
This is not giving correct answer

new.xlsx
ABCAA
1fromto1/1/1900
24/12/20156/2/20194 years,1 months,21 days1401
39/8/20101/8/20121 years,4 months,0 days
45/3/20073/4/20080 years,10 months,1 days
503/05/200204/03/20063 years,10 months,1 days
63 years,10 months,0 days
Sheet1
Cell Formulas
RangeFormula
AA2AA2=SUM(B2:B5)-SUM(A2:A5)
C2:C5C2=DATEDIF(A2,B2,"y") &" years,"&DATEDIF(A2,B2,"ym") &" months," &DATEDIF(A2,B2,"md") &" days"
C6C6=DATEDIF(AA1,AA2,"y") &" years,"&DATEDIF(AA1,AA2,"ym") &" months," &DATEDIF(AA1,AA2,"md") &" days"
 
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Adding multiple date ranges.
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
the number of days depends also on the day (in the month) of startdate
Cell Formulas
RangeFormula
C2:C5,C10:C14,C8C2=DATEDIF(A2,B2,"y") &" years, " &DATEDIF(A2,B2,"ym") & " months, " &DATEDIF(A2,B2,"md") &" days"
D2:D5,D8D2=+B2-A2
D6D6=SUM(D2:D5)
A8:B8A8=SUM(A2:A5)
B10:B14B10=+A10+$D$8
A11:A14A11=EDATE(A10,1)
 
Upvote 0
a problem with the normal way of presenting dates and the US-dateformat, so the numberformat is YYYY-MM-DD
Cell Formulas
RangeFormula
C2:C5,C10:C14,C8C2=DATEDIF(A2,B2,"y") &" years, " &DATEDIF(A2,B2,"ym") & " months, " &DATEDIF(A2,B2,"md") &" days"
D2:D5,D8D2=+B2-A2
D6D6=SUM(D2:D5)
A8:B8A8=SUM(A2:A5)
B10:B14B10=+A10+$D$8
A11:A14A11=EDATE(A10,1)
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

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