Search code examples
google-sheetsspreadsheetgoogle-sheets-apigoogle-sheets-query

Error parsing query from another page using current page data


I'm attempting to use data on another page (scholar progress reports) to match columns in a current page (copy of results).

Using the formula below:

=QUERY('Copy of Results'!$A$2:$I$999, "select D where A="&'Scholar Progress Reports'!A158&"")

Is producing the following error:

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

where 'test' is the value of the cell I'm trying to match on the current page.


Solution

  • Assuming 'test' is in cell A158 of the same sheet, the query is used, try:

    =QUERY('Copy of Results'!$A$2:$I$999, "select D where A='"&A158&"'", 0)
    

    Else, try

    =QUERY('Copy of Results'!$A$2:$I$999, "select D where A='"&'Scholar Progress Reports'!A158&"'", 0)