Get all Rows from QUERY() into one cell in a Google Spreadsheet

Viewed 10249

I have the following formula in a spreadsheet:

=IFERROR( JOIN( CHAR(10), QUERY(Schedule!$A$2:$E, "SELECT C, D, E Where A = '" & B$2 & "' AND B = timeofday '" & text($A4, "HH:MM:SS") & "' AND C = '" & $C$1 & "'", -1)),)

It works great when it returns one row. It does not work if it returns multiple rows. How can I get it to use all rows returned with a CHAR(10) included between rows as well as columns. Basically I want all the returned data separated by line breaks. So when the QUERY returns

Item1 Item2 Item3

Item1A Item2A Item3A

it is changed to

Item1

Item2

Item3

Item1A

Item2A

Item3A

My goal is to put all the returned data in 1 cell with a line break between each item. Any way I can make this happen?

Here is a copy of the file. Cells B3 to F4 are good sample cells where the formula reside.

2 Answers
Related