How to Find specific date in X number of days from within multiple date range?

BlackBirdSR71

New Member
Joined
Oct 15, 2018
Messages
6
Hi,

I want to calculate a specific date after x number of days from within following date-range only (table given below)!

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Trip#[/TD]
[TD]FROM[/TD]
[TD]TO[/TD]
[TD]DAYS[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]12-MAR-2015[/TD]
[TD]24-AUG-2015[/TD]
[TD]165[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]20-AUG-2015[/TD]
[TD]15-FEB-2016[/TD]
[TD]179[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]24-MAR-2016[/TD]
[TD]17-AUG-2016[/TD]
[TD]146[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]20-MAR-2017[/TD]
[TD]22-JUN-2017[/TD]
[TD]94[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]19-MAY-2018[/TD]
[TD]04-OCT-2018[/TD]
[TD]138[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]01-MAY-2019[/TD]
[TD]12-DEC-2019[/TD]
[TD]225[/TD]
[/TR]
</tbody>[/TABLE]
STARTING DATE : 12-MAR-2015
5 YEAR PERIOD : 11-MAR-2020

To elaborate further, I want to find an exact date when total trip's days reach 365th day mark and 730th day mark from within these selected dates only. "FROM" date is counted, but "TO" date is excluded from "DAYS" count.

e.g. according to above table, 365th day would be 14th April 2016 ..... and 730th day would be 9th May 2019

Thanks in advance!
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Welcome to the MrExcel board!

This, using a helper column, produces the results you expect. However, I just want to check if your sample data is correct and/or your expected result. What makes me ask is that four days (20-AUG-2015 to 23-AUG-2015) are counted twice, once in Trip 1 and again in Trip 2. Is that correct?

Both formulas copied down.

Excel Workbook
ABCDEFGH
1Trip#FROMTODAYS
2112-Mar-1524-Aug-15165136514/04/2016
3220-Aug-1515-Feb-161791667309/05/2019
4324-Mar-1617-Aug-16146345
5420-Mar-1722-Jun-1794491
6519-May-184-Oct-18138585
761-May-1912-Dec-19225723
Dates
 
Upvote 0
Hi Peter_SSs,

Thanks for your reply.

Sorry. I made an error in Trip 1 and Trip 2. Following is correct.

Dates
ABCDEFGH

<colgroup><col style="width: 30px;"><col style="width: 47px;"><col style="width: 80px;"><col style="width: 78px;"><col style="width: 55px;"><col style="width: 40px;"><col style="width: 21px;"><col style="width: 40px;"><col style="width: 83px;"></colgroup><tbody>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=CACACA]#CACACA[/URL] , align: center"]1[/TD]
[TD="align: right"]Trip#[/TD]
[TD="align: right"]FROM[/TD]
[TD="align: right"]TO[/TD]
[TD="align: right"]DAYS[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=CACACA]#CACACA[/URL] , align: center"]2[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]12-Mar-15[/TD]
[TD="align: right"]20-Aug-15[/TD]
[TD="align: right"]161[/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=CACACA]#CACACA[/URL] , align: center"]3[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]24-Aug-15[/TD]
[TD="align: right"]15-Feb-16[/TD]
[TD="align: right"]175[/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=CACACA]#CACACA[/URL] , align: center"]4[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]24-Mar-16[/TD]
[TD="align: right"]17-Aug-16[/TD]
[TD="align: right"]146[/TD]
[TD="align: right"][/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=CACACA]#CACACA[/URL] , align: center"]5[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]20-Mar-17[/TD]
[TD="align: right"]22-Jun-17[/TD]
[TD="align: right"]94[/TD]
[TD="align: right"][/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=CACACA]#CACACA[/URL] , align: center"]6[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]19-May-18[/TD]
[TD="align: right"]4-Oct-18[/TD]
[TD="align: right"]138[/TD]
[TD="align: right"][/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=CACACA]#CACACA[/URL] , align: center"]7[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]1-May-19[/TD]
[TD="align: right"]12-Dec-19[/TD]
[TD="align: right"]225[/TD]
[TD="align: right"][/TD]

</tbody>

Thanks for the Formulas. Many Many Thanks for your help. It worked!:rolleyes:

If I may ask, is there a way to restrict it to only check date's data from today's date and going back to the last 5 years? (1825 days to be exact)
 
Upvote 0
Thanks for the Formulas. Many Many Thanks for your help. It worked!:rolleyes:
We are on the right track then. :)


.. is there a way to restrict it to only check date's data from today's date and going back to the last 5 years? (1825 days to be exact)
I think there there will be but can you please clarify the following.

For me, TODAY()-1825 gives 17-OCT-2013

If Trip #1 was from 1-OCT-2013 to 31-OCT-2013
& Trip #2 was from 10-NOV-2013 to 5-DEC-2013

- would the counting start from 17-OCT-2013 (part way through Trip #1 )
- or would it start from 10-NOV-2013 (the start of the next trip after 17-OCT-2013
- or some other date?
 
Upvote 0
I've been trying to figure it out for 2 weeks and your solution worked like charm! Thanks a million!:)

Yeah ... it would be 17th Oct 2013 (Going back exactly 1825 days from Today)
 
Upvote 0
Yeah ... it would be 17th Oct 2013 (Going back exactly 1825 days from Today)
Can we change the DAYS column like this?

Excel Workbook
BCDEFGH
1FROMTODAYSStart17/10/2013
212-Mar-1324-Aug-130136520/05/2015
328-Aug-1315-Sep-130173014/09/2016
427-Sep-1317-Aug-143041
520-Mar-1522-Jan-16308305
619-May-164-Jul-17411613
71-May-1912-Dec-192251024
Dates (2)
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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