Auto copy formula after row insert

michibahn

New Member
Joined
Sep 26, 2011
Messages
25
Hi,

I'm working on a spreadsheet wherein I need to auto copy the formula from the above cell to the new cell below which is technically a new row.

Attached is a snapshot on what I have in excel using the formula =SUM(A1,-B1) in the 1st row then on the 2nd row -- and so on.. =SUM(C1,A2,-B2) to calculate the BALANCE column

totalvo.jpg


values in QTY IN and QTY OUT are automatically populated when I run my script. I just want the BALANCE column to calculate automatically also.

TIA!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I'm confused, how is the new row getting created. if you're just inserting a row below the last row, I don't see why copying down the formula wouldn't work. it looks like it would work to me.
 
Upvote 0
I'm confused, how is the new row getting created. if you're just inserting a row below the last row, I don't see why copying down the formula wouldn't work. it looks like it would work to me.

hi rdw, sorry for the confusion. the new row is inserted from an external data which is an MS Access query.The new row is inserted based on its ID which is another column before QTY IN (I didn't show in my snapshot) So basically, the new row will be inserted randomly anywhere in my table.

If the new row is inserted in the last row of the table, the formula is copied. However, if it was inserted in the middle or anywhere except the last row, the formula is not copied.

thanks!
 
Upvote 0
hi rdw, sorry for the confusion. the new row is inserted from an external data which is an MS Access query.The new row is inserted based on its ID which is another column before QTY IN (I didn't show in my snapshot) So basically, the new row will be inserted randomly anywhere in my table.

I just want the formula to be autmatically copied after inserting a new row.

thanks!

corrected my reply..
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,135
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top