How can I use this expression "=SUM(RC[a0]:RC[a1])" work in Ex
First, since you're using the formula in R1C1 reference style, you should be
using .FormulaR1C1.
Second,
Range(Cells(5, 9), Cells(5, 9))
represents a single cell.
You could either use:
cells(5,9).formulaR1C1 = ...
or even
range("I5").formular1c1 = ....
funmi_Bash wrote:
Dave,
I would just like to say a very BIG 'Thank You" for this post.
Here's the working implementation for the benefit of everyone:
Range(Cells(5, 9), Cells(5, 9)).Formula = "=SUM(RC[" & a0 & "]:RC[" & a1
& "])"
Thanks again, Dave!
"Dave Peterson" wrote:
dim s0 as string 'I'd use long's
dim s1 as string
s0 = "3"
s1 = "6"
somecell.formular1c1 = "=SUM(RC[" & s0 & "]:RC[" & s1 & "])"
funmi_Bash wrote:
I need to insert this formula "=SUM(RC[s0$]:RC[s1$])" in a cell such that the
values a0 and a1 are variables.
How can this be done? Please assist and advice.
--
Dave Peterson
.
--
Dave Peterson
|