Sample data:
A B
-----
1
3
5 9
-----
3
4 7
-----
1
4
5
2 12
-----
I need a formula for Column B that will sum items (could be 1, could be 50 rows) in Column A, where there is known "separators", in this case: -----
There could be thousand of such groups so just adding a formula where I want a sum is out of the question. The formula needs to be one I can simply copy down the column to the end of the data. Thanks.
Last edited by stevemyers; 03-03-2010 at 02:26 PM.
Put this in B2 and copy down:
=IF(A3="----",SUM(INDEX($A$1:A1, MATCH("", $A$1:A1, -1)) :A2), "")
You should also read up on SUBTOTALS()
Last edited by JBeaucaire; 03-01-2010 at 06:59 PM.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
Awesome. Thank you very much.
If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks