title: Autofilter in another sheet using VBA
body: <p>I intend to filter values that begins with 314 in column F, and clear its contents(entire row). The workbook has 30,000+ rows and I think looping is not a good option when filtering in another sheet(sA). I recorded the following code below. </p>
  
  <pre><code>Sheets("sA").Select
  Selection.AutoFilter
  ActiveSheet.Range("$A$1:$AF$30436").AutoFilter Field:=6, Criteria1:="=314*" _
      , Operator:=xlAnd
  ActiveCell.Offset(-181, -2).Range("A1:AF30436").Select
  ActiveCell.Activate
  Selection.ClearContents
  </code></pre>
  
  <p>When I ran the code, a Runtime Error 1004 appears. I think because of the ActiveCell, because I ran the code in a different sheet(sB, where the button for filtering sheets in sA is found). What could be the possible fix to this? Any suggestions?</p>