The most common mistake I make is forgetting to check Autosums when adding a new row.
So I decided to write a macro which checks the Autosums for me.
When I recorded clicking the autosum button, or [alt + =] I got:
ActiveCell.FormulaR1C1 = "=SUM(R[-4]C:R[-1]C)"
So I wrote macro which finds all the necessary values and fills in the formulas.
As far as helps go there is no "Worksheet_afterInsertingRow" event.(or is there?) so I put it in:
Private Sub Worksheet_Change ()
End Sub
But now I have a slightly different sheet and it would be great if I did not have to rewrite everything.
I plan to roughly estimate ranges where no other sums are present then use:
Set rngRange = .Find(What:="SUM", LookIn:=xlFormulas)
Then pass it to "DoAutosum" procedure, which I am guessing is already "built in" in Excel.
How to access the built in macro for Autosums? Is there a list (ideally in help, I have already run out of ideas with keywords and found nothing) of other built in macros?
Bookmarks