title: Filter on a specified column and check for blank if there are blank cells then deletes the entire row
body: <p>I am very new to macro... I want the macro to filter on a specific column named &quot;Container&quot; and check for any blank cells if there are any blank cells then it should delete the entire row. My below codes just hangs the whole excel its not working.</p>
  <p>My COdes: -</p>
  <pre><code>Dim tst As Worksheet
  Dim lRow As Long
  Dim colNumber As Long
  Dim r As Range
  Dim rows As Long
  Dim i As Long
  Dim colHB As String
  Dim ColumnLetter As String
  Dim CCollum As Long
  
  colHB = &quot;Container&quot;
  
  Set tst = ThisWorkbook.Worksheets(&quot;POL&quot;)
  
  lRow = Range(&quot;A1&quot;).End(xlDown).Row
  CCollum = ActiveWorkbook.Worksheets(&quot;POL&quot;).UsedRange.Columns.Count
  
  For i = 1 To CCollum
      If ActiveWorkbook.Worksheets(&quot;POL&quot;).Cells(1, i).Value = colHB Then
          colNumber = i
          ColumnLetter = Split(Cells(1, i).Address, &quot;$&quot;)(1)
          GoTo Continue
      End If
  Next i
  Continue:
    Set r = ActiveWorkbook.Worksheets(&quot;POL&quot;).Range(&quot;A1:&quot; &amp; ColumnLetter &amp; lRow)
    rows = r.rows.Count
    For i = rows To 1 Step (-1)
      If (Len(tst.Cells(i, colNumber))) = 0 Then r.rows(i).EntireRow.Delete
      Next
  Set tst = Nothing
  </code></pre>
  <p><a href="https://i.stack.imgur.com/kveEj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kveEj.png" alt="Column Named &quot;Container&quot; " /></a></p>
  <p>The column named container has few blank cells hence macro should filter on a column named container and then it should delete the whole/entire corresponding row, having blank cells.</p>
  <p><a href="https://i.stack.imgur.com/boJ4A.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/boJ4A.png" alt="This is what the file looks like" /></a></p>