excel表格如何每行插3条空缺行
3、复制以下代码到模块1 4、运行宏Test Sub test()Application.ScreenUpdating = False With Sheets("sheet1") '此处改为实际表名 r = .[A65536].End(xlUp).Row For i = r To 2 Step -1 .Rows(i i + 2).Insert Next End With Applica
3、复制以下代码到模块1
4、运行宏Test
Sub test()Application.ScreenUpdating = False
With Sheets("sheet1") '此处改为实际表名
r = .[A65536].End(xlUp).Row
For i = r To 2 Step -1
.Rows(i & ":" & i + 2).Insert
Next
End With
Application.ScreenUpdating = True
End Sub
2.怎么在EXCEL数据表中(大量数据)每行下插入多行空行需要做宏实现。
按ALT+F11
打开后双击左侧ThisWorkBook打开编辑器把下面的代码贴进去。
Sub XXX()
xx = InputBox("请输入需要插入的行数:", "提示")
Application.ScreenUpdating = False
EndRow = Range("A65536").End(xlUp).Row
For i = 1 To EndRow
Rows(i + 1 + (i - 1) * xx).Select
For j = 1 To xx
Selection.Insert Shift:=xlDown
Next
Next
Application.ScreenUpdating = True
,抖客教程网