redcase
redcase

Reputation: 105

Query and Import Range: values firm a few first rows are being merged

I am using this formula to import select columns from one Google Sheet to another:

=QUERY(IMPORTRANGE("1Y06zLsfEBPL8txxc6V0K6544iNjnNDGRYcKHtdixrOg","Reporting!A:S"),"select Col1, Col3, Col4, Col6, Col7, Col19")
  1. Does anyone know why the values in the First and Second row of the columns are being merged automatically?

Ex: If A1 = "Socks" and A2 = "Hats" in the parent Google Sheet, then cell A1 in the imported range Google Sheet would be = "Socks Hats". Other than the first two rows, everything else looks good.

Upvotes: 1

Views: 2871

Answers (1)

Max Makhrov
Max Makhrov

Reputation: 18717

I think yor problem is data with empty cells, query formula can't automatically detect the header of your table. Try this:

=QUERY(IMPORTRANGE("1Y06zLsfEBPL8txxc6V0K6544iNjnNDGRYcKHtdixrOg","Reporting!A:S"),"select Col1, Col3, Col4, Col6, Col7, Col19", 1)

Upvotes: 1

Related Questions