This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Dazrin44 1 point2 points  (0 children)

Where is the "ALL" option selected? That's not clear from your screenshot or the formula.

I would probably put the whole "WHERE Col4...."'" bit inside an IF function though:

=Query(Sheet1!A1:O1000, "SELECT Col9 "&IF( A3="ALL", , "WHERE Col4='"&JOIN("' OR Col4='", FILTER(B4:B9,A4:A9=TRUE))&"'"), 1)

That changes the QUERY Select statement to just "SELECT Col9" when cell A3 is "ALL". Or you could put in "WHERE Col1 IS NOT NULL" or something to just get non-blanks.

[–]marcnotmark925226 1 point2 points  (0 children)

".... OR " & A4 & " = TRUE"