In my company employees should get a day off if:
1. they work on a friday nightshift(NS)
2. they work on a thursday NS and a saturday NS
3. they work friday morning and saturday NS.
I need to count how many dayoffs every employee should get
MORNING NIGHT WEEKDAY |DAY
PLACE1|PLACE2|PLACE3 PLACE4|PLACE5|PLACE6|
DAV FL RI RI 1 10
DAV RI FL DAV 2 11
FL RI DAV FL 3 12
DAV RI FL DAV 4 13
FL RI DAV RI FL 5 14
DAV 6 15
FL DAV 7 16
DAV FL RI RI 1 17
DAV RI FL DAV 2 18
FL RI DAV FL 3 19
DAV RI FL DAV 4 20
FL RI DAV RI 5 21
FL DAV 6 22
RI FL 7 23
In this example FL gets 2 days off
RI gets 1 day off
DAV gets 2 days off
Counting the nightshifts of friday could be achieved with COUNTIFS.
=COUNTIFS(D3:D34,"DAV",G3:G34,"6")+COUNTIFS(E3:E34,"DAV",G3:G34,"6")+COUNTIFS(F3:F34,"DAV",G3:G34,"6")
but things get complicated when I have to use the name condition on 6 different columns, each with a different weekday condition, i.e employee on T+SAT or F+SAT, Is there any way to achieve this using only built-in formula w/o scripts?