Maybe the error "Formula parse error" occurs because your spreadsheet use semicolon as argument separator instead of comma. Replace the commas by semicolons (;
)
It's not possible to directly compare to a cell by including the cell address into the SQL argument of QUERY. Also there is no Col2 in
Sheet!A2
, this is referring to only once cell. If this is correct instead of QUERY use IF
=IF(IMPORTRANGE("spreedsheetURL","Sheet1!A2") = B3, "spreedsheetURL","Sheet1!A2") , )
If you want to retrieve whole column A, instead of "Sheet1!A2"
use "Sheet1!A:A"
Assuming Sheet1!A:A and B3 contains numbers, the formula to use should be
=QUERY(IMPORTRANGE("spreedsheetURL","Sheet1!A:A"),"select Col1 WHERE Col1 Contains "&B3)
Assuming Sheet1!A:A and B3 contains text, the formula to use should be
=QUERY(IMPORTRANGE("spreedsheetURL","Sheet1!A:A"),"select Col1 WHERE Col1 Contains '"&B3&"'")