5、ction.EntireRow.Delete //删除选定单元格所在行 EndIf j=j+1 Loop i=i+1 Loop EndSub·如何批量隔行删除Excel行收藏按Alt+F11打开VBA编辑器,编写以下函数:批量隔行删除Sub RowsDelete(Odd As Long)e/2009Dim nRows As Long Dim i As Long With Worksheets("sheet1")nRows = .UsedRange
6、.Rows.CountFor i = nRows To 2 Step -1IfIMod2=oddThen.Row(i).DeleteEndifNextEndwithENDSubOdd为0时删除偶数行为1时删除奇数行Subtest()Sheet1.RowsDelete(0)Endsub