I have a query (=QUERY(A9:N,"Select C,D,E,F,G,H,I where B contains """&L3&"""")
) Which returns a header row and a row where the answers are either true or false - depending on the the tickboxes in the query array.
I am trying to find whichever Column has true and return the header in a TEXTJOIN
- so that I get one cell with all the true headers if that makes sense.
My current attempt is with an array formula
=TEXTJOIN(" | ",true ,ArrayFormula(if(QUERY(A9:N,"Select C,D,E,F,G,H,I where B contains """&L3&"""")=true,[HELP],"")))
but I don't know how to return the header or rather return the value of the cell right above the true - it would be easy enough if I let it fill up a 7x2 box but again - would prefer a one-cell answer