Count overlapping times on a moving 30 min window

kbrono

New Member
Joined
May 29, 2016
Messages
1
I searched the forums for a similar question and did not see one that helped with this question.

I need to know on average how many airplanes are on the ground at the same time during the day.

To get an accurate number it needs to look 30 minutes ahead of and behind the departure time and then count how many other departure times fall in that window. Here is a sample set for two different days.


<colgroup span="3" width="137"></colgroup> <colgroup width="154"></colgroup> <colgroup span="2" width="137"></colgroup> <tbody>
[TD="align: center"] Day [/TD]
[TD="align: center"] Equip [/TD]
[TD="align: center"] Dept Time [/TD]
[TD="align: center"] Total Departure [/TD]
[TD="align: center"] Dept Hour [/TD]
[TD="align: center"] Staffing [/TD]

[TD="align: center"] 1-Sep-16 [/TD]
[TD="align: center"] CM9 [/TD]
[TD="align: center"] 6:43 [/TD]
[TD="align: center"] 1 [/TD]
[TD="align: center"] 6 [/TD]
[TD="align: center"] 4 [/TD]

[TD="align: center"] 1-Sep-16 [/TD]
[TD="align: center"] CM9 [/TD]
[TD="align: center"] 7:00 [/TD]
[TD="align: center"] 1 [/TD]
[TD="align: center"] 7 [/TD]
[TD="align: center"] 4 [/TD]

[TD="align: center"] 1-Sep-16 [/TD]
[TD="align: center"] CM9 [/TD]
[TD="align: center"] 7:45 [/TD]
[TD="align: center"] 1 [/TD]
[TD="align: center"] 7 [/TD]
[TD="align: center"] 4 [/TD]

[TD="align: center"] 1-Sep-16 [/TD]
[TD="align: center"] CM9 [/TD]
[TD="align: center"] 8:05 [/TD]
[TD="align: center"] 2 [/TD]
[TD="align: center"] 8 [/TD]
[TD="align: center"] 8 [/TD]

[TD="align: center"] 1-Sep-16 [/TD]
[TD="align: center"] CM9 [/TD]
[TD="align: center"] 8:10 [/TD]
[TD="align: center"] 1 [/TD]
[TD="align: center"] 8 [/TD]
[TD="align: center"] 4 [/TD]

</tbody>


<colgroup span="3" width="137"></colgroup> <colgroup width="154"></colgroup> <colgroup span="2" width="137"></colgroup> <tbody>
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

</tbody>

<colgroup span="3" width="137"></colgroup> <colgroup width="154"></colgroup> <colgroup span="2" width="137"></colgroup> <tbody>
[TD="align: center"] 2-Sep-16 [/TD]
[TD="align: center"] CPJ [/TD]
[TD="align: center"] 8:45 [/TD]
[TD="align: center"] 1 [/TD]
[TD="align: center"] 8 [/TD]
[TD="align: center"] 3 [/TD]

[TD="align: center"] 2-Sep-16 [/TD]
[TD="align: center"] CPJ [/TD]
[TD="align: center"] 9:15 [/TD]
[TD="align: center"] 1 [/TD]
[TD="align: center"] 9 [/TD]
[TD="align: center"] 3 [/TD]

[TD="align: center"] 2-Sep-16 [/TD]
[TD="align: center"] CPJ [/TD]
[TD="align: center"] 10:20 [/TD]
[TD="align: center"] 1 [/TD]
[TD="align: center"] 10 [/TD]
[TD="align: center"] 3 [/TD]

[TD="align: center"] 2-Sep-16 [/TD]
[TD="align: center"] CPJ [/TD]
[TD="align: center"] 10:30 [/TD]
[TD="align: center"] 1 [/TD]
[TD="align: center"] 10 [/TD]
[TD="align: center"] 3 [/TD]

[TD="align: center"] 2-Sep-16 [/TD]
[TD="align: center"] CPJ [/TD]
[TD="align: center"] 12:46 [/TD]
[TD="align: center"] 1 [/TD]
[TD="align: center"] 12 [/TD]
[TD="align: center"] 3 [/TD]

</tbody>

So for the first item I should get a value of 2 because nothing exists before 6:43 and there is only one other departure by 7:13 (30 min after 6:43). Now for example sake look at the fourth line. This should return a value of 4 because there is one departure within :30 min prior of 8:05 and one within :30 after 8:05 (there are two departures at 8:05).

So when then first aircraft is on the ground there is a total of two but when the 4th is on the ground there is a total of 3.

I then would need it to reset for the next calendar day. I will then take the average for every day for the entire month to say "at any given time there are xx aircraft on the ground at the same time"

The data set i have is a few thousand large.

Thanks,
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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