Search code examples
google-sheetsimportrange

IMPORTRANGE: value missing?


I have been working on this issue for a few weeks now and can't seem to find a solution. I used this answer (IMPORTRANGE with CONDITIONS) to get as far as I could, but I keep getting a value error.

This is the sheet I'm working with.

My goal is to use the first tab in the sheet (All Games) to enter all the games that I come across to create a compendium. But, then I want it to automatically populate the other tabs based on certain criteria (what type of game, skills learned, etc.)

On the Warm-Ups tab you'll see the formulas I have tried. A1 is the most recent.

Here is the formula I tried:

=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1F64PMg_iFu-DaJAUaE4BkpqF4zoteknp56VfwAUe8ag/edit#gid=1359689553", "All Games!A1:A1300"),"SELECT Col1 WHERE (Col2 = 'w') ")

I am getting a value error:

Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: Col2


Solution

  • you are trying to reference Col2 but you selected range A1:A1300 which is just 1 column. therefore try:

    =QUERY(IMPORTRANGE("1F64PMg_iFu-DaJAUaE4BkpqF4zoteknp56VfwAUe8ag", "All Games!A1:B1300"),
     "SELECT Col1 WHERE (Col2 = 'w') ")
    

    from the brief look on your sheet, you may want use matches or contains instead of = in your QUERY