title: Using one macro on different tables, independently
body: <p>Goal</p>
  
  <p>A button that executes Autofilter on a table based on cell values. </p>
  
  <p>Problem</p>
  
  <p>When duplicating the sheet, the macro refers to the table on the original sheet.</p>
  
  <p>Current Code</p>
  
  <pre><code>Sub Macro1()
      ActiveSheet.ListObjects("Table33").Range.AutoFilter Field:=6, Criteria1:="&gt;" &amp; Range("K9").Value
  End Sub
  </code></pre>
  
  <p>Is there a way to assign a table in a relative manner? The table always appears in the same cells, sheet by sheet.</p>