I have a row in which there are formulas using values of the same row. The next row is empty, just with a different background color.
Now, if I insert a new row (by right-clicking on the empty row and "insert"), I get a new row with NO background color (which is what I want), but the line also does NOT contain any formulas: how do I get Excel to be smarter and copying the formulas from the previous row, when creating the new row?
One more piece of information: data validation information (i.e. a drop down list) is copied when inserting the new row.
Thanks.
Make the area with your data and formulas a Table:
Then adding new information in the next line will copy all formulas in that table for the new line. Data validation will also be applied for the new row as it was for the whole column. This is indeed Excel being smarter with your data.
NO VBA required...
You need to insert the new row and then copy from the source row to the newly inserted row. Excel allows you to paste special just formulas. So in Excel:
VBA if required with Rows("1:1") being source and Rows("2:2") being target:
Rows("2:2").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("2:2").Clear
Rows("1:1").Copy
Rows("2:2").PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With