title: Fastest way to (auto)filter multiple criterias in Excel and delete non-matching rows?
body: <p>I have the following code that I am using as a workaround instead of filtering the data as I have multiple criterias. I read somewhere that it is only possible to filter 2 criterias at a time?<br>
  The thing is that I have 5 - <code>AB, DZ, RE, Z3, ZP</code> - everything else should be deleted. So I am using the code below, which works fine, but having to deal with +30000 rows everytime I run the macro, it is extremely slow.<br>
  Is there anyway you can do this faster? I was thinking of just filtering each criteria at a time (creating 5 of the first of the below codes). But if there is anyway to do it faster, I would appreciate some help.</p>
  
  <p><strong>THE CODE I USE THAT IS SLOW:</strong></p>
  
  <pre><code>' Step 13 - Filter and Delete All Except
  '           AB, DZ, RE, Z3, ZP in Column 6 - Type
  Sub FilterDeleteType()
  Dim rTable As Range, r As Range
  Dim rDelete As Range
  Set rDelete = Nothing
  Dim v As Variant
  
  Worksheets("Overdue Items").Activate
  
  For Each r In Columns(6).Cells
      v = r.Value
      If v &lt;&gt; "Type" And v &lt;&gt; "AB" And v &lt;&gt; "DZ" And v &lt;&gt; "RE" And v &lt;&gt; "Z3" And v &lt;&gt; "ZP" Then
          If rDelete Is Nothing Then
              Set rDelete = r
          Else
              Set rDelete = Union(r, rDelete)
          End If
      End If
  Next
  
  If Not rDelete Is Nothing Then rDelete.EntireRow.Delete
  End Sub
  </code></pre>