作者:十分风格的功夫_723 | 来源:互联网 | 2023-10-13 06:11
IhavethistableinExcel:我有一张Excel表格:andIhavethefollowingformulaincolumnN:第N列有如下公式:
I have this table in Excel:
我有一张Excel表格:
and I have the following formula in column N:
第N列有如下公式:
Under the button named Adauga
, I have a subroutine that adds new rows before row 5:
在名为Adauga的按钮下,我有一个在第5行之前添加新行的子例程:
Sub Button3_Click()
Sheets("Sheet1").Range("A5").Select
ActiveCell.EntireRow.Insert Shift:=xlDown
End Sub
But the formula does not copy into the new row. How can I modify my code to copy the formula also? I tried some methods but I ended up copying the values also. It is important that the row inserts before row 5.
但是这个公式不会复制到新的行中。如何修改代码以复制公式?我尝试了一些方法,但最后也复制了这些值。第5行之前的行插入是很重要的。
1 个解决方案