You probably want 1 instead of 16 as the last parameter of the query; this parameter means the number of header rows, not of headers.
You also have an extra pair of parentheses in your formula. Otherwise the formula is correct (tested in my spreadsheet), although you could shorten it by replacing select Col1,Col2,..., Col16
with select *
=QUERY(IMPORTRANGE("URL","Sheet Name!A2:P1000"),"SELECT * WHERE Col6 CONTAINS 'Abstract & TO'",1)
A possible source of your errors is that your spreadsheets are not connected for the purpose of IMPORTRANGE
:
In the new version of Google Sheets, spreadsheets must be explicitly granted permission to pull data from other spreadsheets using IMPORTRANGE
. The first time the destination sheet pulls data from a new source sheet, the user will be prompted to grant permission.
Unfortunately, you will not see this prompt if your IMPORTRANGE
command is within a QUERY
; the parse error is thrown instead as there is nothing for QUERY
to parse. To connect the spreadsheet, import something first, e.g.,
=IMPORTRANGE("URL","Sheet Name!A1")
You will see #REF
error; hovering over it shows an explanation and "connect" button.
I'm not sure, but it could be some sort of glich.
This post may help you.
I had similiar problems. I tried doing this:
- refreshing page
- changing range in the formula to force it recalculate:
"Sheet1!A:C"
→ "Sheet1!A1:C6000"
- Also found smart way to make it with iferror:
iferror(IMPORTRANGE("SHEET_KEY","Sheet1!A:C"))
If this won't help, please give example file.
Best Answer
Replace
by