title: Assign active cell value to a filter as criteria in another sheet
body: <p>I'm trying to use an active cell value as the criteria for a filter on another work sheet.</p>
  
  <p>My Active cell value (in the first sheet ("WIthout Dupes") should be the value of filter criteria in the second sheet ("Master"). So ultimately my code should not have <code>Range("B$142").Select</code> but the Active cell value and the criteria1 should be referring to the Active cell value of the first sheet.</p>
  
  <p>I tried to use </p>
  
  <pre><code> Sub test1()
  '
  ' test1 Macro
  '
  
  '
      Range("B$142").Select
      Selection.Copy
      Sheets("Master").Select
      ActiveSheet.Range("$A$1:$AR$1787").AutoFilter Field:=1, Criteria1:= _
          "00065062"
      Columns("X:X").Select
      Application.CutCopyMode = False
      Selection.Copy
      Sheets("WIthout Dupes").Select
      Range("B145").Select
      ActiveSheet.Paste
      Sheets("Master").Select
      Application.CutCopyMode = False
      ActiveSheet.ShowAllData
      Range("A1").Select
      Sheets("WIthout Dupes").Select
      Range("B143").Select
      ActiveCell.FormulaR1C1 = "done"
  
  End Sub
  </code></pre>