Imagine I had a sheet like this
People Alpha Bravo Charlie Delta Echo Foxtrot
p1 x x
p2 x x x
p3 x x x
etc. How could I make a function that printed the number of people who took 2 of the following: Alpha, Charlie, Echo and Foxtrot
AKA one of these permutations: A & C, A & E, A & F, C & E, C & F, E & F
Heading
CodePudding user response:
If the cell values are x
:
=((B2="x") (D2="x") (F2="x") (G2="x"))=2
If the cell values are checkbox(TRUE
):
=(B2 D2 F2 G2)=2
CodePudding user response:
try:
=INDEX(QUERY(SPLIT(FLATTEN(IF(B2:G = "x"; A2:A&"♥"&B1:G1; )); "♥");
"where Col2 is not null"; ))