I want to import a range of data from one Google Spreadsheet (1) into another (2), but only when Column J in spreadsheet 1 contains a 'yes'.
I'm using the following formula:
=query(ImportRange("0AgbNxxZ5QnpGdEU2R3BLVDlhd0t6VlhCbS1kQWNYT2c","Renewals!B:C"),"select Col2, Col3, Col5 where Col10='Yes' ")
(which I've hashed together having looked on forums & YouTube!)
But it keeps coming back with errors: Col10 does not exist, etc.
How can I fix it?
Best Answer
There are two things that you need to take into consideration.
Consideration
IMPORTRANGE
function requires two parameters (strings):The data range needs to correspond to the number of columns you're about to use. In your case, you selected only column B and column C. Therefore, going beyond col2 will end up in failure.
Data
Number
String
Example
I've created an example file for you: