title: QUERY syntax for using a 'cell reference' after the 'where'
body: <p>I'm trying to use submitted Google Form data in one spreadsheet to locate and retrieve data from another spreadsheet (tab in same document). <a href="https://docs.google.com/spreadsheet/ccc?key=0AhNVNg1xSJ6-dGpvdFJGMmpuWExWeUE2SWhFQ21Wb3c&amp;usp=sharing" rel="nofollow noreferrer">The Google Spreadsheet file is here.</a></p>
  <p><strong>The =QUERY statement I'm trying to use is below</strong></p>
  <pre><code>=QUERY(sheet2!A1:K; &quot;Select B, C where A =&quot; &amp; B1  ; 0)
  </code></pre>
  <p>It works if I remove the <strong>'cell reference'</strong> from <code>where A =&quot; &amp; B1  ; 0)</code> and I replace it with a <strong>'static value'</strong> like <code>where A contains '123456' &quot;)</code></p>
  <p>Any suggestions on 'how' to get the =QUERY to work using a 'cell referenced' value. The heading for the column being referenced is TEXT but the value of all rows below the heading is a NUMBER</p>
  <p>Thank you in advance,</p>
  <p>Todd</p>