3

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?

3

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.

  • 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! – Douglas Gaskell Sep 28 '15 at 2:42
  • THANK YOU, @user79865! I was stumped on a similar case and you nailed it! – Peter Bowers Sep 11 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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