Autocalculate average formula on inserting a new row

aakhan2011

New Member
Joined
Jan 12, 2014
Messages
21
I have a sheet(Sample.xlsx) in which weekly data is collected and this is done by using the VBA code(Present in Copy 1 and Copy 2 button in Master US.xlsm) written by me. But in my code, it inserts a new after asking two parameters, i.e. line range(i.e. row no for eg A64) and date. After the new row is inserted, the average formula below the row need to change accordingly with the new row that gets inserted but it remains the same. :( .I wanted the average formula to change to new new average after the below row is inserted and the formula to be dragged to other column of the row using the VBA Script that is already present in the Copy 1 and Copy 2 button in Master US.xlsm.


Can anyone please help me to accomplish this .
Sheet attached along with VBA Code in "Copy 1" and "Copy 2" buttons.


Sample.xlsx - Speedy Share - upload your files here

Master US.xlsm - Speedy Share - upload your files here


Thanks in advance.:)
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,137,353
Messages
5,680,994
Members
419,948
Latest member
Sbakker1

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
Top