Hi All,


I have data in P21 to P44
I sum it using a formula "=SUBTOTAL(9, P21:P44)" in row 45.

I inserted 10 rows using a macro and pasted some data in these newly inserted rows by opening another workbook using the macro.

My formula is not changing. It remains same.
I want this formula as "=SUBTOTAL(9, P21:P54)

How can I achieve this?

Thanks in advance.