G
Guest
Why does the following macro jump to End Sub after it encountered the first
cell with 0 (zero) value instead of deleting the entire row?
Values to be tested are in column B
Sub RemoveRow()
Range("B2:B30").Select
Do Until ActiveCell.Value = 0
If ActiveCell.Value = 0 Then
ActiveCell.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub
cell with 0 (zero) value instead of deleting the entire row?
Values to be tested are in column B
Sub RemoveRow()
Range("B2:B30").Select
Do Until ActiveCell.Value = 0
If ActiveCell.Value = 0 Then
ActiveCell.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub