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.

DayEquipDept TimeTotal DepartureDept HourStaffing
1-Sep-16CM96:43164
1-Sep-16CM97:00174
1-Sep-16CM97:45174
1-Sep-16CM98:05288
1-Sep-16CM98:10184

<colgroup span="3" width="137"></colgroup> <colgroup width="154"></colgroup> <colgroup span="2" width="137"></colgroup> <tbody>
</tbody>


<colgroup span="3" width="137"></colgroup> <colgroup width="154"></colgroup> <colgroup span="2" width="137"></colgroup> <tbody>
</tbody>
2-Sep-16CPJ8:45183
2-Sep-16CPJ9:15193
2-Sep-16CPJ10:201103
2-Sep-16CPJ10:301103
2-Sep-16CPJ12:461123

<colgroup span="3" width="137"></colgroup> <colgroup width="154"></colgroup> <colgroup span="2" width="137"></colgroup> <tbody>
</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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,215,635
Messages
6,125,943
Members
449,275
Latest member
jacob_mcbride

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