这对所有人来说都是孩子的游戏,但我根本不懂Visual Basic。如何编写语句以反复在Excel电子表格中的两行之间插入行?以下示例:
F-3757 - GROF FILTER REWORKLIJN
F-3758 - POEDERAFSCHEIDER
F-3759 - FIJNFILTER
F-3760 - STOFILTER
F-3762 - AANZUIGFILTER
B-3771 - VENTILATOR STORTKOKER
为:
F-3758 - POEDERAFSCHEIDER
F-3759 - FIJNFILTER
F-3760 - STOFILTER
F-3762 - AANZUIGFILTER
B-3771 - VENTILATOR STORTKOKER
答案 0 :(得分:4)
Sub Insert_Blank_Rows()
''//Select last row in worksheet.
Selection.End(xlDown).Select
Do Until ActiveCell.Row = 1
''//Insert blank row.
ActiveCell.EntireRow.Insert shift:=xlDown
''//Move up one row.
ActiveCell.Offset(-1, 0).Select
Loop
End Sub
VBA Express显示了如何完成它的示例