4

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?

1 Answer 1

5

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.

2
  • Ah, in my case I would actually set it to 0 because I am not including the header rows in my query. And it worked! Sep 28, 2015 at 2:42
  • THANK YOU, @user79865! I was stumped on a similar case and you nailed it! Sep 11, 2019 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.