I'm trying to find a way to calculate how many people are available at every 30 minute interval in a day, based on their start time and end time.
For example, if 4 people come in at 7:00 AM and leave at 3:00 PM and 3 Come in at 8:00 AM and leave at 4:00 PM then that means;
7:00 AM = 4
7:30 AM = 4
8:00 AM = 7
8:30 AM = 7
and so on.
but of course, once 3:00 PM is here, it would be something like this.
2:30 PM = 7
3:00 PM = 3
3:30 PM = 3
and so on.
I have column A with the "Start Times" and Column B with "Exit Times" based on everyone's schedules
Here's some sample schedules data
In Out
7:00 AM 3:00 PM
7:00 AM 1:00 PM
7:00 AM 3:00 PM
7:00 AM 3:00 PM
8:00 AM 1:00 PM
8:00 AM 2:00 PM
8:00 AM 4:00 PM
8:00 AM 4:00 PM
8:00 AM 4:00 PM
8:00 AM 4:00 PM
8:00 AM 4:00 PM
8:00 AM 2:00 PM
8:00 AM 3:00 PM
8:00 AM 4:00 PM
9:00 AM 4:00 PM
9:00 AM 5:00 PM
9:00 AM 5:00 PM
9:00 AM 5:00 PM
9:00 AM 5:00 PM
9:00 AM 5:00 PM
9:00 AM 5:00 PM
9:00 AM 5:00 PM
9:00 AM 5:00 PM
9:00 AM 5:00 PM
9:00 AM 5:00 PM
9:00 AM 5:00 PM
9:00 AM 5:00 PM
9:00 AM 5:00 PM
9:00 AM 5:00 PM
10:00 AM 6:00 PM
10:00 AM 6:00 PM
10:00 AM 6:00 PM
10:00 AM 6:00 PM
10:00 AM 6:00 PM
then on Column D I have all 24-hour 30 minute intervals in the following format.
12:00 AM
12:30 AM
1:00 AM
1:30 AM
2:00 AM
2:30 AM
3:00 AM
3:30 AM
4:00 AM
4:30 AM
5:00 AM
5:30 AM
6:00 AM
6:30 AM
7:00 AM
7:30 AM
8:00 AM
8:30 AM
9:00 AM
9:30 AM
10:00 AM
10:30 AM
11:00 AM
11:30 AM
12:00 PM
12:30 PM
1:00 PM
1:30 PM
2:00 PM
2:30 PM
3:00 PM
3:30 PM
4:00 PM
4:30 PM
5:00 PM
5:30 PM
6:00 PM
6:30 PM
7:00 PM
7:30 PM
8:00 PM
8:30 PM
9:00 PM
9:30 PM
10:00 PM
10:30 PM
11:00 PM
11:30 PM
I could manually do this but I'm trying to avoid this by making it simpler just copy-pasting everyone's schedules in columns A and B and have the the results displayed in column E (next to D)
I have been doing this manually but the more people and more schedules arrive, it gets a little more frustrating to continue to calculate this manually.
I don't mind if this could be done using formulas or VBA.
The only thing I've been able to do so far is to COUNTIF how many schedule start each hour =COUNTIF(A:A, D2) and how many end each hour =COUNTIF(B:B, D2) and it simply makes it easier for the rest of the manual work but other than that, I can't think of a way to do everything before mentioned.
Thanks in Advance,