Data is in rows 2:3001
If the value in column H of each row is zero I need the entire row deleting.
I thought the above would work but it seems to only remove a couple of rows, where most of them should be deleted!!
TIA
If the value in column H of each row is zero I need the entire row deleting.
Code:
Sub DeleteRows()
Dim ChkRange As Range
Set ChkRange = Range("H2:H3001")
Dim cell As Range
For Each cell In ChkRange
If cell = "0" Then
cell.EntireRow.Delete
End If
Next
End Sub
I thought the above would work but it seems to only remove a couple of rows, where most of them should be deleted!!
TIA