Log in

View Full Version : Delete Rows



ayazgreat
12-13-2012, 10:26 AM
Hi

I have data from column a to column b, I need code if any cell blank or having value 0 in column b then entire row would delete.

Thanks in advance.

Admin
12-13-2012, 11:34 AM
Hi

try


Sub kTest()

With Intersect(ActiveSheet.UsedRange, Range("b:b"))
On Error Resume Next
.Replace "0", vbNullString, 1
.SpecialCells(4).EntireRow.Delete
End With

End Sub

ayazgreat
12-13-2012, 11:48 AM
Thank you very much Sir, it works fine.