headcount by hour spanning midnight

rish251974

New Member
Joined
Aug 23, 2018
Messages
2
Hello, I am looking for a formula/method to calculate the headcount by hour of day. I have employees whose shift crosses midnight hours.

e.g.

employee Start End
A 06:00 14:30
B 14:00 22:30
C 22:00 06:30

Now I would like to populate a sheet with hours of the day and a column that displays the headcount by hour

Hr Headcount
1 1
2 1
6 2

For some reason, when I used the sumproduct formula, it didn't give me the right count for employees whose shift crosses midnight.
Any help would be greatly appreciated.

Thanks.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hello,
Here is an example of the data :

IDstart timeend time
23499986:0014:30
207847822:006:30
10411406:0014:30
205829422:006:30
10347526:0014:30
4113796:0014:30

<colgroup><col span="3"></colgroup><tbody>
</tbody>

This is what I want to display
Hour Headcount
1 2
2 2
3 2
4 2
5 2
6 6
7 4
8 4
9 4
10 4
11 4
12 4
13 4
14 4
15 4
16 0
17
18
19
20
21
22
23
24
 
Upvote 0

Forum statistics

Threads
1,216,507
Messages
6,131,059
Members
449,616
Latest member
PsychoCube

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