Employees per hour calculations

Wgoldbaum

New Member
Joined
Jun 19, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I’m trying to count employees per hour but the problem I have is that we have people clocking in and staying past 12AM.

Current Formula:
=sum(((A2>=$B$2:$B$32)*(A2<=$C$2:$C$32)))

A2 is the time of day so 12am,A3 is 1am so on and so forth

B column is the start times of the employee and C column is the end time.

The problem is when I get to late evenings I have employees clocking in at 4pm, 5pm,6pm etc….and clocking out 12am, 1am, or later resulting in them not being counted in the later evening times because their clock out times land outside of the formula. The middle of the day works perfectly though.

Does anyone know how to work around this?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
@Wgoldbaum Does this help?

Excel Formula:
=SUM((A2>=$B$2:$B$32)*(A2<=$C$2:$C$32+IF($C$2:$C$32<=$B$2:$B$32,1,0)))
 
Upvote 0

Forum statistics

Threads
1,226,461
Messages
6,191,168
Members
453,644
Latest member
karlpravin

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