Intersection of two time intervals

mikskov

New Member
Joined
Dec 13, 2006
Messages
25
Hello all,

I was wondering if there exists a neat effective way of calculating the number of days two date intervals overlaps?

Example:
Interval 1: 5. jun 2011 - 21. jun 2011
Interval 2: 10. jun 2011 - 15. jun 2011
Interval 3: 1. jan 2011 - 30. sep 2011

Intersection( interval 1, interval 2 ) = 6 days
Intersection( interval 1, interval 3 ) = 17 days

Many thanks!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Excel Workbook
ABCD
1StartEnd
26/5/20116/21/2011
36/10/20116/15/20116
41/1/20119/30/201117
5
Sample Sheet
 
Upvote 0
If you are always checking the overlap with Interval 1, is this what you mean?

Formula copied down.

Excel Workbook
ABC
1
205-Jun-201121-Jun-2011
310-Jun-201115-Jun-20116
401-Jan-201130-Sep-201117
525-Jun-201108-Jul-20110
621-Jun-201122-Jun-20111
701-Jan-201128-Feb-20110
Overlap
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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