Hi everyone,
I try to create a simple VB code that can delete rows with "0" in colum B (from row 1700 to row 30) for mutiple sheets, starting from Sheet 8. I'm new at this forum and VB. I'm really appreciated for any help and suggestion. Here is the code,
Function DeleteCompletelyBlankRows()
Dim LastRow As Integer
Dim n As Integer
Dim k As Integer
k = ActiveWorkbook.Worksheets.Count
For i = 8 To k - 1 Step 1
Sheets(i).Select
LastRow = 1700
For n = LastRow To 30 Step -1
If Cells(n, "B").Value = 0 Then
Cells(n, "B").EntireRow.Delete
End If
Next i
End Function
Thanks a lot!
Jerry
Bookmarks