‘工作表中单元格,行与列的插入与删除 Sub 插入() Rows(2).Insert End Sub Sub 隔行插入() Dim r% Do r = r + 2 Rows(r).Insert Loop Until Cells(r + 1, 1) = "" End Sub Sub 删除() Rows(1).Delete End Sub Sub 隔行删除() Dim r, s m = Application.CountA(Columns(1)) For r = 1 To m / 2 Rows(r).Delete Next End Sub Sub 隔行删除_我的想法() list_num_a = Application.CountA(Range("a:a")) For i = 1 To list_num_a Rows(i).Delete If Cells(i, 1) = "" Then GoTo aa: End If Next aa: End Sub
时间: 2024-10-06 02:37:03