title: Excel VBA deleting rows based on an if statement (speed up)
body: <p>I am deleting rows based on the value in column P.
  Cells in column P have an if statement: IF(K&lt;10,0,1)</p>
  
  <p>If the value in column P is 0, then the row needs to be deleted. 
  I am using the following macro which works but takes quite long. 
  I would like to beable to process about 10000 rows. </p>
  
  <p>It would be much appreciated if I could have some suggestions on speeding up this code. </p>
  
  <p>[I had tried using this if statement: IF(K&lt;10,"",1)
  And then deleting rows using SpecialCells(XlCellTypeBlanks) but the the cells are not interpreted as blank , due to the presence of the formula I presume. ]</p>
  
  <pre><code> Sub RemoveBlankRows()
  
     Application.ScreenUpdating = False
      'PURPOSE: Deletes any row with 0 cells located inside P
      'Reference: www.TheSpreadsheetGuru.com
  
     Dim rng As Range
     Dim blankrng As Range
     Dim cell As Range
  
     'Store blank cells inside a variable
     'On Error GoTo NoBlanksFound
  Set rng = Range("P2:P30000") '.SpecialCells(xlCellTypeBlanks)
  'On Error GoTo 0
  
  For Each cell In rng
  If cell.Value = 0 Then
      cell.EntireRow.Delete
      'Value = ""
  End If
  Next
  
  Application.ScreenUpdating = True
  End Sub
  </code></pre>