?
Solved

Sum Variable individual Cells within a given column

Posted on 2010-11-17
3
Medium Priority
?
373 Views
Last Modified: 2012-05-10
     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())))"

Open in new window

0
Comment
Question by:bearblack
3 Comments
 
LVL 93

Expert Comment

by:Patrick Matthews
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

by:
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

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question