title: How to delete rows based on empty cell value in VBA
body: <p>I am trying to delete entire rows based on whether the cell value in the D column is NULL or not. My entire code so far is:</p>
  
  <pre><code>Sub DeleteNULL()
  
  Dim i As Long
  
  For i = 2 To 119713
          If IsEmpty(Range("Di")) = True Then
               Rows([i]).EntireRow.Delete
  
          Else
              If IsEmpty(Range("Di")) = False Then
              Next i
  
          End If
  
  
  End Sub
  </code></pre>
  
  <p>I keep getting compile errors, either If without Else or Next without For, how should I fix this?</p>
  
  <p>Thanks in advance.</p>