2
votes

So I am trying to query data from Sheet2 to another using parameters from Sheet1 and the query works fine for the first parameter but the second parameter I get the error message

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

Here is my function

=QUERY(Sheet2!A1:D10,"SELECT C WHERE A = "& B1 &" AND B = " & D1, 0)

Here is my example sheet to see my issue

https://docs.google.com/spreadsheets/d/14nBFL-WPdwSu9PUMYShRZqCAfo20oBl-4ZCDrvjDHqk/edit?usp=sharing

1
text needs to be wrapped into 'singlequotes'player0

1 Answers

1
votes

use:

=QUERY(Sheet2!A1:D10, "SELECT C WHERE A = "&B1&" AND B = '"&D1&"'", 0)

enter image description here