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 7×2 box but again – would prefer a one-cell answer
https://docs.google.com/spreadsheets/d/1e3FtvRGlefL154GCAYg8LpU_3jJOADZJVFBNBaOrDwQ/edit?usp=sharing
The spreadsheet is rather large but sheet in question is "Resource Node Overview"
Any and all help is appreciated!
>Solution :
try:
=INDEX(TEXTJOIN(" | ", 1, IF(QUERY(A9:N,
"select C,D,E,F,G,H,I where B contains '"&L3&"'", 0)=TRUE, C9:I9, )
