Google Sheets Query – How to Fix Query Returning a Single Concatenated String

google sheetsgoogle-sheets-query

I'm getting some really weird results from my QUERY() Here is an image with an example:

enter image description here

I'm querying for the name where No Show = "No Show". It find the correct name Name 5 but also returns a concatenated list of names separated by a space.

Why is this happening? How do I fix it?

Best Answer

The third, optional, argument of query command is

The number of header rows at the top of data. If omitted or set to -1, the value is guessed based on the content of data.

In your situation, the formatting of column A confused the query, and it interpreted most of that column as header rows. Solution: explicitly indicate the number of header rows, i.e., 1 in your case.