Error '424' Object required in if statement
<p>The code is expected to run a loop and delete all the respective rows of cells that are in column b and have no cell value. On running the code, Error '424' Object Required is displayed. why do this error normally arise as I get this error a lot in if statements?  </p>

<pre><code>Sub cleaning()

Dim s As Worksheet
Dim r As Range
Set s = ThisWorkbook.ActiveSheet
Set r = s.Range("B:B")

r.Activate



For Each c In r
If c.Value Is Nothing Then
s.Range("B" &amp; c.Row).EntireRow.Delete
End If
Next c


End Sub
</code></pre>