Search code examples
google-sheetsfiltergoogle-sheets-formulagoogle-sheets-queryimportrange

Formula parsing error when use Query and Importrange


I need to import data from another sheet, but only even-numbered rows (has a number in column A in addition to the spreadsheet numbering).

I'm using importrange and query to make this filter, but I'm experiencing the following error: "Formula parsing error".

This is the query I'm trying to use:

=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1oI0NsjQnf1Grh59HSei64c5F6nuqnjyGSQCXvLJbcmA", "Página1!A2:J1000"),"SELECT * WHERE (A % 2) = 0")

This command only:

=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1oI0NsjQnf1Grh59HSei64c5F6nuqnjyGSQCXvLJbcmA";"Página1!A2:J100")

works, so the problem would be with my Query.


Solution

  • use:

    =FILTER(IMPORTRANGE("1oI0NsjQnf1Grh59HSei64c5F6nuqnjyGSQCXvLJbcmA"; "Página1!A2:J"); 
     ISEVEN(IMPORTRANGE("1oI0NsjQnf1Grh59HSei64c5F6nuqnjyGSQCXvLJbcmA"; "Página1!A2:A")))
    

    0