title: SQL query that uses a range in excel as the criteria
body: <p>I use external data from an SQL query in excel to pull data onto a spreadsheet then the spreadsheet can be sent to one of my colleges in say the sales department and they can view the queried information.<br>
  I want to be able to have a cell that they can enter data into and press a refresh button.</p>
  
  <p>So I need to do some thing like this:</p>
  
  <pre><code>SELECT     Customer.CustomerCode, Customer.Name, 
             OrderHeader.OrderType, OrderHeader.OrderNumber
  FROM       Customer INNER JOIN
             OrderHeader ON Customer.CustomerID = OrderHeader.CustomerID
  WHERE     (OrderHeader.OrderType = 2) AND (OrderHeader.OrderNumber = Range("A1").Value)  
  </code></pre>
  
  <p>Not sure how or if this is possible and the reason I need to do this is because i'm going through lines from all the Quotes and if there is over 65536 then i'll have a problem.  </p>
  
  <p>This is what I have at the moment the SQL is different but that doesn't matter</p>
  
  <p><img src="https://i.stack.imgur.com/vfUOZ.png" alt="enter image description here"></p>