# Need formula to calculate # of employees working each hour

#### Vdillon

##### New Member
Hi all! I am having difficulty using formulas to calculate the number of employees who are working each hour. I believe this is because my overnight shift is a little tricky. Here is the formula I am currently using and a snip of how my schedule is built. Any ideas on how to get the overnight to calculate correctly, on the correct day would be greatly appreciated!

=(COUNTIF(\$C\$6:\$C\$23,">="&A35)-COUNTIF(\$B\$6:\$B\$23,">"&A35))

Thanks!
https://ibb.co/Fg2WHfz

Last edited by a moderator:

### Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

#### DanteAmor

##### Well-known Member
You could put examples of the data you have and the expected result.

Replies
1
Views
130
Replies
1
Views
82
Replies
17
Views
235
Replies
2
Views
50
Replies
1
Views
87

Threads
1,108,973
Messages
5,525,987
Members
409,673
Latest member
Riseee