title: Deleting rows with multiple blank cells in that row using AutoFilter
body: <p>We have an Excel file with over 550,000 rows, and my task is to "clean up" this worksheet.  This file contains all of the products that we get from different vendor and all the data that goes with it.</p>
  
  <p>The specific task I am having trouble with is how to delete all of the rows in which column A AND Column B are both empty.</p>
  
  <p>Using a MUCH smaller excel file, this can very easily be done using:</p>
  
  <pre><code>Dim j As Long, i As Long
  
  j = Cells(Rows.Count, "C").End(xlUp).Row
  For i = j To 1 Step -1
      If Cells(i, "A") = "" And Cells(i, "B") = "" Then
          Cells(i, "A").EntireRow.Delete
      End If
  Next I
  </code></pre>
  
  <p>Unfortunately, this does not work due to the sheer size of the file.</p>
  
  <p>Before this point, I successfully deleted all rows that have a blank cell in column C using the following code:</p>
  
  <pre><code>Application.ScreenUpdating = False
  Application.EnableEvents = False
  Application.Calculation = xlCalculationManual
  
  Dim oldWs As Worksheet, newWs As Worksheet
  Dim wsName As String, lastRow As Range
  
  Set oldWs = Worksheets(2)
  wsName = oldWs.Name
  
  lastRow = ActiveSheet.UsedRange.Rows.Count
  
  If lastRow.Rows.Count &gt; 1 Then
      Set newWs = Sheets.Add(After:=oldWs)
      With lastRow
          .AutoFilter Field:=3, Criteria1:="&lt;&gt;"
          .Copy
      End With
      With newWs.Cells
          .PasteSpecial xlPasteColumnWidths
          .PasteSpecial xlPasteAll
          .Cells(1, 1).Select
          .Cells(1, 1).Copy
      End With
      oldWs.Deletesheet
      newWs.Name = wsName
  End If
  
  Application.ScreenUpdating = True
  Application.EnableEvents = True
  Application.Calculation = xlCalculationAutomatic
  </code></pre>
  
  <p>I have been looking around on how to use .AutoFilter on multiple columns, but nothing seems to be working properly.</p>
  
  <p>Any method or ways to speed up the first mentioned process, to allow multiple Fields to be entered into .AutoFilter, or just any other way in general would be such a big help</p>
  
  <p>p.s. I have looked at almost every related question/answer and could not find something that works for me, but I feel like I'm getting close</p>