By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,065 Members | 1,598 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,065 IT Pros & Developers. It's quick & easy.

Adding a block of data

P: n/a
Hi there,

Would welcome advice on the following.

Trying to add a block of data (say cell h8 to H12) iusing
the following statement

row_no = ActiveCell.Row
ActiveCell.Offset(1#).FormulaR1C1 = "=Sum(R[-" + Trim(Str
(row_no)) + "]c:r[-1]c)"
The formula sadly adds cell H1 to H12.....
Any idea as to how to only get the statement / formulae to
return the sum of cells H8 to H12

Thanks in advance
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
This looks like an Exel VBA question. Are you doing this in

In any case, Offset takes two parameters. Try something as follows:
row_no = ActiveCell.Row
ActiveCell.Offset(1, 0).FormulaR1C1 = "=Sum(R[-" + Trim(Str(row_no)) +

Hope this helps!
Bharat Patel
Microsoft, Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.