Macro SUM

Closed
Sammy - Oct 28, 2011 at 06:09 AM
Ambucias Posts 47310 Registration date Monday February 1, 2010 Status Moderator Last seen February 15, 2023 - Oct 28, 2011 at 06:11 AM
Hello,

Can I get a macro to add a total line? I want to specify the starting row each time, but then sum down to the row above the totals.

I've tried

ActiveCell.Offset(0, 3).Range("a1").Select
Dim x As Integer
x = InputBox("Which row to sum from?")
ActiveCell.FormulaR1C1 = "=SUM(R[x]C:R[-1]C)"
Range("a1").Select

With no luck. Any suggestions?

1 response

Ambucias Posts 47310 Registration date Monday February 1, 2010 Status Moderator Last seen February 15, 2023 11,165
Oct 28, 2011 at 06:11 AM
Greetings,

Please, bare in mind that before any answer given on the forum, you should know that there are volunteers who give their time trying to solve user problems. They do have a life other than this forum including me.

Therefore, it is specifically requested from Kioskea forum users to show their respect. For this, the use of polite expressions is a minimum.
https://ccm.net/apps-sites/internet-archeology/ccm/10131-terms-of-use-for-ccm-respect-for-others/#politesse

To say please, thank you, appreciate, grateful, etc... is common courtesy when you want something, especially help!

You must copy, modify and repost your message respecting the politeness charter.

We trust that you understand.

Moderator
0