title: Filter table in excel VBA based on a column of values
body: <p>I have a table and I would like to filter the rows by the values in one of its columns.  The values used to filter are stored in a separate column not in the table.  This is what I have so far:</p>
  
  <pre><code>Dim table1 As ListObject
  Dim range1 As Range
  Set range1 = ActiveSheet.range("AM23:AM184")
  'get table object
  table1.range.AutoFilter Field:=3, Criteria1:=???
  </code></pre>
  
  <p>I do not know what to put for criteria1.  I know it needs to be an Array and I can set it to something like Array("12","2","13") but what I need it to equal is the values specified in the range given by range1.  Any help would be greatly appreciated.</p>
  
  <p>EDIT:  I have been able to get my range values into an Array by doing range1.Value and then converting the Variant into a string array.  This did not work as I wanted it to as it just sets my Filter to the last value in my array.  For instance, if my array contains the IDs ("12","44","13","22") and I set Criteria1 to that array and run it, the filter only has 22 selected and all other numbers are deselected including 12, 44, and 13.</p>