I need help with vba code that autosums column O two cells below the last row of data.
I am currently using the following code:
Range("O2").Select
Selection.End(xlDown).Select
ActiveCell.Offset(2, 0).Select
Application.CommandBars("Standard").Controls("Autosum").Controls("Sum").Execute
SendKeys "{ENTER}", True
The problem is it switches over to editing after the autosum command and doesn't execute the sendkey correctly.
Thanks guys
I am currently using the following code:
Range("O2").Select
Selection.End(xlDown).Select
ActiveCell.Offset(2, 0).Select
Application.CommandBars("Standard").Controls("Autosum").Controls("Sum").Execute
SendKeys "{ENTER}", True
The problem is it switches over to editing after the autosum command and doesn't execute the sendkey correctly.
Thanks guys