COUNTIF

  • Thread starter Thread starter The Rook
  • Start date Start date
T

The Rook

Can anyone let me know the best way to handle thin on?
Sheet 1
In column A I have a list of employees, in column B I have a list of their
start times and in column C I have a list of their finish times.

What I am wanting to do is caculate how many employees are at work during
specific hours. ie 09:00 to 12:00 of 10:00 to 15:00.

I was trying to use some sort of COUNTIF statement but could not get
anything to work which got me thinking is the is a totally different way to
do this.

Thanks
 
Hi,
Have to cells for the results, for the ones between 9-12 enter

=COUNTIF(B1:B3,"<10")

for the ones from 10-15

=COUNTIF(B1:B3,">=10")

if this helps please click yes, thanks
 
This is pretty tricky.
If you set up your desired start time in I1 (like 9:00) and desired end time
in J1 (like 12:00), then you'd use this formula wherever you like:
=SUMPRODUCT((B2:B100<=$J$1)*(C2:C100>=$I$1))
This will test for anyone whose start time is before the desired end time
AND whose end time is after the desired start time.
 
Back
Top