2

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

player0
  • 124,011
  • 12
  • 67
  • 124
TJ Weems
  • 1,086
  • 3
  • 21
  • 37

1 Answers1

1

use:

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

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124