Search code examples
arraysgoogle-sheetsgoogle-sheets-formulagoogle-sheets-queryimportrange

Google Sheets Import Range + Query combining first rows


I am using a query on import range to pull relevant data from one spreadsheet into another. It was working fine, then all of the sudden it started combining the first 8 rows into one row, but the rest are importing as normal. The columns are spaced correctly, but each column is concatenating the first 8 rows for some reason.

Here is my formula:

=query(importrange("other_sheet","Sheet1!$A$2:$O"),"Select Col1,Col7,Col2,Col3,Col4")

What can I do to make sure the first 8 rows each return into their own rows from the query?


Solution

  • try to force it with 0 header rows like:

    =QUERY(IMPORTRANGE("other_sheet", "Sheet1!$A$2:$O"), "select Col1,Col7,Col2,Col3,Col4", 0)