title: Macro to Filter Data table on multiple criteria based on specific cell value
body: <p>I tried to record a macro to filter a data table based on the values of 2 cells. It only worked the first time because VBA recorded the cell value instead of the cell reference. I have not been able to figure out how to alter the code to do the following:</p>
  
  <ol>
  <li>Change the filter selection when the cell value changes</li>
  <li>have the filter selection change without navigating to the worksheet containing the data table. </li>
  </ol>
  
  <p>The worksheet where the reference cells are located is called "Cost Estimator" and the worksheet with the data table is "AR_BOM"</p>
  
  <p>The table name is "BOM_Table"</p>
  
  <p>Here is the code that was recorded:</p>
  
  <pre><code>Sub Filter_AR_BOM()
  '
  ' Filter_AR_BOM Macro
  '
  
  '
      Range("E25").Select
      Selection.Copy
      Sheets("AR_BOM").Select
      ActiveSheet.ListObjects("BOM_Table").Range.AutoFilter Field:=4, Criteria1:= _
          "Line 11"
      Sheets("Cost Estimator").Select
      Range("J10").Select
      Application.CutCopyMode = False
      Selection.Copy
      Sheets("AR_BOM").Select
      ActiveSheet.ListObjects("BOM_Table").Range.AutoFilter Field:=13, Criteria1 _
          :="12197118"
      Sheets("Cost Estimator").Select
  End Sub
  </code></pre>
  
  <p>Any help is greatly appreciated. I've been trying different things from forums for almost 2 days and don't seem to be making any headway. I'm an extreme macro/vba novice, so I know that doesn't help anything.</p>