Formula for Date/Time Stamp Overlap

bevo993071

New Member
Joined
Jul 28, 2015
Messages
3
Can anyone help me with a formula to determine if two date/time stamps representing a range of time overlaps with another? I am been playing around with SUMPRODUCT however am unable to figure it out... I am dealing with multiple aircraft out of one base. See example below:


[TABLE="width: 500"]
<tbody>[TR]
[TD]Departed[/TD]
[TD]Arrived[/TD]
[TD]Overlap
[/TD]
[/TR]
[TR]
[TD]5/1/15 04:30[/TD]
[TD]5/1/15 08:30[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]5/1/15 06:45[/TD]
[TD]5/1/15 06:45[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]5/2/15 08:15[/TD]
[TD]5/2/15 09:15[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]5/2/15 13:15[/TD]
[TD]5/2/15 16:15[/TD]
[TD]NO[/TD]
[/TR]
</tbody>[/TABLE]


Thank you all
 

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.
I fear I might not have done this right. Try it on your broader data and we'll see.


Excel 2012
ABC
1DepartedArrivedOverlap
25/1/15 04:305/1/15 08:30Yes
35/1/15 05:455/1/15 06:45Yes
45/2/15 08:155/2/15 09:15No
55/2/15 13:155/2/15 16:15No
Sheet15
Cell Formulas
RangeFormula
C2=IF(AND(SUMPRODUCT(--(A2<=$A$2:$A$5))>1,SUMPRODUCT(--(B2<=$B$2:$B$5))>1,SUMPRODUCT(--(A2<=$B$2:$B$5))>1,SUMPRODUCT(--(B2<=$A$2:$A$5))>1),"Yes","No")
C3=IF(AND(SUMPRODUCT(--(A3<=$A$2:$A$5))>1,SUMPRODUCT(--(B3<=$B$2:$B$5))>1,SUMPRODUCT(--(A3<=$B$2:$B$5))>1,SUMPRODUCT(--(B3<=$A$2:$A$5))>1),"Yes","No")
C4=IF(AND(SUMPRODUCT(--(A4<=$A$2:$A$5))>1,SUMPRODUCT(--(B4<=$B$2:$B$5))>1,SUMPRODUCT(--(A4<=$B$2:$B$5))>1,SUMPRODUCT(--(B4<=$A$2:$A$5))>1),"Yes","No")
C5=IF(AND(SUMPRODUCT(--(A5<=$A$2:$A$5))>1,SUMPRODUCT(--(B5<=$B$2:$B$5))>1,SUMPRODUCT(--(A5<=$B$2:$B$5))>1,SUMPRODUCT(--(B5<=$A$2:$A$5))>1),"Yes","No")
 
Last edited:
Upvote 0
Forget what I did there. I've been looking for a proper solution and I think this is it.

Source: Find overlapping date ranges in excel | Get Digital Help - Microsoft Excel resource



Excel 2012
ABC
1DepartedArrivedOverlap
25/1/15 04:305/1/15 08:30Yes
35/1/15 05:455/1/15 06:45Yes
45/2/15 08:155/2/15 09:15No
55/2/15 13:155/2/15 16:15No
Sheet15
Cell Formulas
RangeFormula
C2=IF(SUMPRODUCT((A2<$B$2:$B$5)*(B2>=$A$2:$A$5))>1,"Yes","No")
C3=IF(SUMPRODUCT((A3<$B$2:$B$5)*(B3>=$A$2:$A$5))>1,"Yes","No")
C4=IF(SUMPRODUCT((A4<$B$2:$B$5)*(B4>=$A$2:$A$5))>1,"Yes","No")
C5=IF(SUMPRODUCT((A5<$B$2:$B$5)*(B5>=$A$2:$A$5))>1,"Yes","No")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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