Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer
Dim n As String
n = Application.CountA(Range("B:B"))
For i = 2 to n step -1
Do While Cells(i, 11) = "check"
Cells(i, 11).Select
Selection.EntireRow.Delete
Loop
Next i
End Sub
倒着删就行了
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer
Dim n As String
n = [b65536].end(3).row
For i = n to 2 step -1
if Cells(i, 11) = "check" then
Cells(i, 11).Select
Selection.EntireRow.Delete
end if
Next i
End Sub
for i = 2 to n
改为 for i = n to 2 step -1