📜  excel删除其他vba代码示例

📅  最后修改于: 2022-03-11 14:51:55.232000             🧑  作者: Mango

代码示例1
Sub Delete_Every_Third_Row()
Dim Rng As Range
Set Rng = Application.InputBox("Select the Range (Excluding headers)", "Range Selection", Type:=8)
For i = Rng.Rows.Count To 1 Step -3
If i Mod 3 = 0 Then
Rng.Rows(i).Delete
End If
Next i
End Sub