View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
shg[_17_] shg[_17_] is offline
external usenet poster
 
Posts: 1
Default need formula for counting employees by hour


Maybe like this:

Code:
--------------------

---A--- --B-- --C-- D --E-- --F--
1 In Out Time Staff
2 Abel 14:00 22:30 04:00 2
3 Bob 08:00 16:30 04:30 2
4 Charlie 07:00 15:30 05:00 3
5 Dan 07:00 15:30 05:30 3
6 Evie 09:00 17:30 06:00 3
7 Frank 05:00 13:30 06:30 3
8 Ida 08:00 16:30 07:00 7
9 Juliet 09:00 17:30 07:30 7
10 Ken 12:00 20:30 08:00 9
11 Lenny 04:00 12:30 08:30 9
12 Mary 15:00 23:30 09:00 11
13 Nancy 10:00 18:30 09:30 11
14 Oscar 13:00 21:30 10:00 15
15 Penny 04:00 12:30 10:30 15
16 Quentin 10:00 18:30 11:00 16
17 Randy 14:00 22:30 11:30 16
18 Sam 11:00 19:30 12:00 17
19 Tom 07:00 15:30 12:30 15
20 Urie 07:00 15:30 13:00 16
21 Vic 14:00 22:30 13:30 15
22 Yanny 10:00 18:30 14:00 18
23 Zeb 10:00 18:30 14:30 18
24 15:00 19
25 15:30 15
26 16:00 15
27 16:30 13
28 17:00 13
29 17:30 11
30 18:00 11
31 18:30 7
32 19:00 7
33 19:30 6
34 20:00 6
35 20:30 5
36 21:00 5
37 21:30 4
38 22:00 4
39 22:30 1
40 23:00 1
41 23:30 0
--------------------

The formula in F2 and down is

=SUMPRODUCT( ($B$2:$B$19 <= E2) * ($C$2:$C$19 E2) )


--
shg
------------------------------------------------------------------------
shg's Profile: http://www.thecodecage.com/forumz/member.php?userid=13
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=27209