I created a Gantt chart and used that to produce the employee count for each hour. I filled C3:U3 with the hours.
In C4 this formula was entered and filled across and down:
Formula:
=IF($A4="","",IF(AND($A4<$B4,C$3>=$A4,C$3<=$B4),1,IF(AND($A4>$B4,C$3>=$A4,C$3>=$B4),1,IF(AND($A4>$B4,C$3<=$A4,C$3<=$B4),1,""))))
C26 has this formula filled across:
Formula:
=SUM(C4:C25)
B33 has this formula filled down:
Formula:
=INDEX($C$26:$U$26,MATCH(A33,$C$3:$U$3,0))
In the black area of the Gantt chart are 1s and those 1s are then summed under the chart.
Bookmarks