View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
funmi_Bash funmi_Bash is offline
external usenet poster
 
Posts: 4
Default How can I use this expression "=SUM(RC[a0]:RC[a1])" work in Ex

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
.