Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » FormulaR1C1 notation help
FormulaR1C1 notation help
Resolved · High Priority · Version 2007
FormulaR1C1 notation help
Hi all,I was wondering how in VBA where we have the FormulaR1C1 notation as:
activecell.FormulaR1C1 = "=SUM(RC[+1]:RC[+3])"
If how many rows/columns back I want to go is variable, how can I set the +1 and +3 values to some variable integer?
For upcoming training course dates see: Pricing & availability
RE: FormulaR1C1 notation help
Hi AndrewThank you for your question regarding using FormuaR1C1.
The FormulaR1C1 property is a string so to use variables for the column offset in the formula you would need to add the different pieces of the string together using &.
Using your example and two integer variables iColOffset1 and iColOffset2 the code would change to
ActiveCell.FormulaR1C1 = "=SUM(RC[+" & iColOffset1 & "]:RC[+" & iColOffset2 & "])"
I hope that helps.
Please let me know how you get on.
Laura GB
Tue 27 Jan 2009: Automatically marked as resolved.
|
|
Distance Learning Vs Face To Face Tuition Over the years distance learning has become a popular and convenient way of studying for GCSE's, A Levels, professional qualifications and even degrees thanks to the introduction of web-based settings, applications and tools. But, can distance learning provide the same kind of learning experience as a classroom environment? » Article: Training providers |
» Forum post: Inner forms |
» Tip: Generate simple column chart |



Course updates

