Google-sheets – Collated and separated results in one cell for QUERY results across multiple columns

google sheetsgoogle-sheets-query

In a Google Sheet I have the following formula:

=CONCATENATE(QUERY(Summary!I4:U200,"Select I,U where S='"&A3&"'"))

This currently returns each pair of results in sequence (with no spaces) and in a single cell, as in (assuming 3 results on sheet "Summary"):

A1B1A2B2A3B3

But I would like the results returned separated, as in:

A1/B1, A2/B2, A3/B3

I tried using JOIN as in:

=JOIN(", ",(QUERY(Summary!I4:U200,"Select I,U where S='"&A3&"'")))

But this returns the following error:

JOIN range must be a single row or single column.

I tried exploring various solutions (e.g. using array formulas and also using SPLIT), but I can't get the result I want.

Anyone?

Best Answer

Try =TEXTJOIN

=ARRAYFORMULA(TEXTJOIN(" , ", TRUE,QUERY(A1:C4, "Select *"),0 ))

I'm not sure why JOIN doesn't work but I find TEXTJOIN works a little better.