Solved

# Sum Variable individual Cells within a given column

Posted on 2010-11-17
Medium Priority
373 Views
I have a need to sum variable cells within a colimn the attached formula give me a ref error. I have varified that each of the cells have a valid entry for summation.

``````Range(Cells(SummaryR5, 2).Address & ":" & Cells(SummaryR5, 13).Address).Formula = _
"=SUM(Indirect(Address(" & SummaryR + 2 & ",COLUMN())& "","" &Address(" & SummaryR2 & ",COLUMN())& "","" &Address(" & SummaryR4 & ",COLUMN())))"
``````
0
Question by:bearblack

LVL 93

Expert Comment

ID: 34155831
Please use a couple of sentences to describe what the formula is supposed to do.

A sample file illustrating the goal would be most helpful :)
0

LVL 85

Accepted Solution

Rory Archibald earned 2000 total points
ID: 34155839
Try:

Range(Cells(SummaryR5, 2), Cells(SummaryR5, 13)).FormulaR1C1 = _
"=SUM(R" & SummaryR + 2 & "C,R" & SummaryR2 & "C,R" & SummaryR4 & "C)"
0

LVL 2

Author Comment

ID: 34155899
Tried to make it to hard -- Thanks
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
###### Suggested Courses
Course of the Month17 days, 1 hour left to enroll