正如您在下面看到的,当列 F 中的任何单元格的值为零时,我试图删除整个。但是,我的代码在第 3 行不断调试。
' DELETES ALL ROWS FROM F2 DOWNWARDS WITH THE VALUE = 0 IN COLUMN F
Last = Cells(Rows.Count, 6).End(xlUp).Row
For i = Last To 1 Step -1
If (Cells(i, 6).Value) = 0 Then
Cells(i, 6).EntireRow.Delete
End If
Next i