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

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
@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,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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