Hello,
I am trying to write a code which looks at rows 13-33 and deletes an entire row if ALL the cells in Columns B-M are 0 or blank and Column A is not blank.
Right now my code deletes the entire row if Column B is 0; doesn't look at the other columns.
I know I need to insert a loop somewhere.
Any help would be greatly appreciated.
Following is the code:
Sub scheduleA()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Sheets("Schedule A Template").Select
Dim RowstoDelete As Long
x = 33
For RowstoDelete = Cells(x, 2).End(xlUp).Row To 13 Step -1
If (Cells(RowstoDelete, 2).Value = "0") And (Cells(RowstoDelete, 1).Value <> "") Then
Rows(RowstoDelete).Delete Shift:=xlUp
End If
Next RowstoDelete
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
Bookmarks