Calculating the overlap time between observations

ETSHA

New Member
Joined
Nov 2, 2013
Messages
8
Hi all,
I'm working on a large dataset (85 K obs), for each observation I have a start date, start time, end date, end time, a field defining whether the observation is a commercial or a show and channel.
I want to calculate the amount of overlap time between observations such that they are both commercials and are different channels. Meaning, if I have three channels, then for a relevant observation (commercial) I want to know the amount of overlap time with each of the two other channels separately.
Any ideas on ow to go about doing this?

ET
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
I entered the first 20 rows:
IndexShow/CommChannelS_DateS_TimeE_DateE_Time
1Show11/1/200119:0:21/1/200119:20:59
2Show11/1/200119:21:01/1/200120:55:18
3Commercial11/1/200120:55:181/1/200120:59:25
4Show11/1/200120:59:251/1/200121:0:33
5Show11/1/200121:0:341/1/200121:31:55
6Commercial11/1/200121:31:551/1/200121:34:46
7Show11/1/200121:34:461/1/200122:31:47
8Commercial11/1/200122:31:471/1/200122:33:55
9Show11/1/200122:33:551/1/200123:32:35
10Commercial21/1/200119:6:471/1/200119:10:21
11Show21/1/200119:20:511/1/200120:0:0
12Show21/1/200120:0:01/1/200120:33:49
13Commercial21/1/200120:20:151/1/200120:22:12
14Commercial21/1/200120:33:491/1/200120:39:12
15Show21/1/200120:39:121/1/200121:36:13
16Commercial21/1/200120:55:121/1/200121:0:3
17Commercial21/1/200121:15:211/1/200121:20:46
18Commercial21/1/200121:36:131/1/200121:36:20
19Show21/1/200121:36:201/1/200122:32:51

<colgroup><col width="64" span="7" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
I entered the first 20 rows:
IndexShow/CommChannelS_DateS_TimeE_DateE_Time
1Show11/1/200119:0:21/1/200119:20:59
2Show11/1/200119:21:01/1/200120:55:18
3Commercial11/1/200120:55:181/1/200120:59:25
4Show11/1/200120:59:251/1/200121:0:33
5Show11/1/200121:0:341/1/200121:31:55
6Commercial11/1/200121:31:551/1/200121:34:46
7Show11/1/200121:34:461/1/200122:31:47
8Commercial11/1/200122:31:471/1/200122:33:55
9Show11/1/200122:33:551/1/200123:32:35
10Commercial21/1/200119:6:471/1/200119:10:21
11Show21/1/200119:20:511/1/200120:0:0
12Show21/1/200120:0:01/1/200120:33:49
13Commercial21/1/200120:20:151/1/200120:22:12
14Commercial21/1/200120:33:491/1/200120:39:12
15Show21/1/200120:39:121/1/200121:36:13
16Commercial21/1/200120:55:121/1/200121:0:3
17Commercial21/1/200121:15:211/1/200121:20:46
18Commercial21/1/200121:36:131/1/200121:36:20
19Show21/1/200121:36:201/1/200122:32:51

<colgroup><col width="64" span="7" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
say if I have three channels then three more columns - (1) overlap with channel i; (2) overlap with channel j; and (3) overlap with channel k. For an observation of channel i, column (1) will be empty and for the two remaining columns a total time of overlap. The problem I can't figure out is how to make a sort of vlookup with conditions.

ET
 
Upvote 0
From an eye examination we have that Index 53041 and Index 53054 overlap. I would like to make a calculation such that for the row of index 53041 in the column "Overlap with Channel 1" I'l have 0, in the column "Overlap with Channel 2" I'll have empty cause it's the same channel" and in the column "Overlap with Channel 3" I'l have the aount of overlap between the index 53041 and the index 53054.

IndexShow/CommChannelWeekdayS_DateS_TimeE_DateE_TimeDurationOverlap with Channel 1Overlap with Channel 2Overlap with Channel 3
53027Commercial1226/4/200421:7:5526/4/200421:10:360002:41
53029Commercial1226/4/200421:11:5826/4/200421:12:280000:30
53031Commercial1226/4/200421:25:1226/4/200421:26:400001:28
53034Commercial2226/4/200419:29:4126/4/200419:29:480000:07
53038Commercial2226/4/200421:13:5226/4/200421:17:50003:13
53039Commercial2226/4/200421:20:3426/4/200421:20:420000:08
53041Commercial2226/4/200421:32:2926/4/200421:41:400009:11
53042Commercial2226/4/200421:54:4826/4/200422:3:60008:18
53043Commercial2226/4/200422:22:2126/4/200422:30:590008:38
53044Commercial2226/4/200422:44:1326/4/200422:52:240008:11
53045Commercial2226/4/200422:59:4126/4/200423:1:220001:41
53046Commercial3226/4/200419:4:1226/4/200419:4:260000:14
53048Commercial3226/4/200419:29:2326/4/200419:29:400000:17
53052Commercial3226/4/200421:15:2126/4/200421:15:360000:15
53054Commercial3226/4/200421:29:2726/4/200421:34:440005:17
53055Commercial3226/4/200421:49:2326/4/200421:54:320005:09
53056Commercial3226/4/200422:1:1626/4/200422:7:540006:38
53058Commercial3226/4/200422:32:1126/4/200422:38:420006:31

<colgroup><col width="64" span="12" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,858
Messages
6,121,956
Members
449,057
Latest member
FreeCricketId

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