title: Using a range of excel value as conditions in a SQL query
body: <p>I am trying to write a macro that queries the SQL database but enters a condition into the query.  That condition is a range of values in a column in the spreadsheet.</p>
  
  <p>So, I have "Sheet1", where column A is titled "code" with values from A2 onwards.  I want to run a SQL query that says:</p>
  
  <pre><code>SELECT value FROM dbtable WHERE code = 'ValueFromA2'
  </code></pre>
  
  <p>With the result being populated in cell B2.</p>
  
  <p>I then need to continue that query down through B3, B4, etc. until it's reached the end of the range of values in column A.</p>
  
  <p>Is this possible?</p>