excel中插入新一行时,如何自动套用上一行的公式?

如题所述

方法一:选择带有公式的一行复制,然后在要插入行的地方点右键选择插入已复制的\r\n\r\n方法二:将当前的数据区域转换成table格式,07版的在插入透视表的右边那个按钮,03版的在data菜单下的list,excel就会自动套用格式和公式,智能识别\r\n\r\n方法三:在上方的输入栏中输入以下内容即可:\r\nPrivate Sub Worksheet_Change(ByVal Target As Range)\r\nOn Error Resume Next\r\nIf Application.WorksheetFunction.CountA(Target.Rows) = 0 Then _\r\nTarget.Rows.Offset(-Selection.Rows.Count, 0).AutoFill Destination:=Selection.Offset(-Selection.Rows.Count, 0).Resize(Selection.Rows.Count * 2)\r\nEnd Sub
温馨提示:答案为网友推荐,仅供参考
相似回答