The macro below correctly deletes the row if the cells in the range have a 0 value. I am trying to add code that would not delete the row even if the cells in the range had zeros if there is a value in column A. I can't figure it out.
Sub delete0()
Dim found As Boolean: found = False
Dim lastRow As Long: lastRow = Range("h" & Rows.Count).End(xlUp).Row
Application.Calculation = xlCalculationManual
For j = lastRow To 9 Step -1
For i = 6 To 9 And Not found
If Cells(j, i) <> 0 Then found = True
Next i
If Not found Then
Rows(j & ":" & j).delete Shift:=xlUp
End If
found = False
Next j
Application.Calculation = xlCalculationAutomatic
End Sub
Bookmarks