答案1
如果你将光标放在下面要插入的行上,这将执行此操作并复制该行的格式:
Sub InsertRowBelow() Application.ScreenUpdating = False ActiveCell.Offset(1, 0).EntireRow.Insert ActiveCell.EntireRow.Copy ActiveCell.Offset(1, 0).Select Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Application.CutCopyMode = False Application.ScreenUpdating = True End Sub