=SUMPRODUCT(--((C$3:C$13<B16)+(D$3:D$13>B15)+(B$3:B$13>C$3:C$13)=3))
I found this formula online, except at the end it was a =2 rather than the =3. I put the =3 in it because it wasn't exactly working the way I needed it to, and once I did that everything seemed to work just fine. But I want to understand how and why it works.
=SUMPRODUCT(--((C$3:C$13<B16)+(D$3:D$13>B15)+(B$3:B$13>C$3:C$13)=3)) IS PLACED IN B16, B20 AND B24
...A.................B.............C..............D
1
2 DATE START STOP
3 BEN............2/8/16......6:00......16:30
4 ANDY..........2/8/16......6:00......16:30
5 JUSTIN........2/8/16......6:00......16:00
6 ROB............2/8/16
7 MELANIE.....2/8/16......6:00......16:30
8 CHANG.........2/8/16......6:00......16:30
9 JOHN...........2/8/16......6:00......16:30
10 PAUL..........2/8/16
11 ANH...........2/8/16
12 MATT..........2/8/16......6:00......15:30
13
14 START.....6:00
15 END.......15:30
16 WORKERS....7
17
18 START....15:30
19 END.....16:00
20 WORKER....6
21
22 START....16:00
23 END......16:30
24 WORKERS....5
25
26
27
Bookmarks