Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50158

[SOLVED] Automatic update of a "sum" cell when row inserted not working

$
0
0
Hello,

Another in the simple things that are causing me grief series :(

SO, I have a series of rows with data (say A1:A5) and in cell A6 I have a "=sum(A1:A5) formula.

If I manually insert a new row after A3 for example, excel happily changes my sum formula to include the new row.

However, using the code snippet below in a macro happily inserts the row but the sum formula isn't updated???:confused:

Anybody spot what i am clearly not doing correctly please

Code:

        Rows(next_daily_row).Select
        Selection.Copy
' add in new row
        Selection.Insert Shift:=xlDown
        Application.CutCopyMode = False

Thanks in advance

Jmac1947

Viewing all articles
Browse latest Browse all 50158

Trending Articles