Assuming that each set contains three rows, try...
=SUM(OFFSET(D1,MATCH(G2,A:A,0),0,3))
Hope this helps!
In article ,
randys wrote:
THANK YOU for the quick answer. Let me complicate it a bit more ... (not that
I want to, but this is closer to the problem I'm trying to solve)
Using the same formula, I want to be able to sum 3 different sets of data
independently based on a pointer in a cell. For example:
A B C D E F G
1 First <formula
2 10 Second
3 5
4 2
5
6 Second
7 20
8 10
9 4
10
.
.
.
21 Third
22 30
23 15
24 6
Using a formula in cell G1, based on the information in cell G2, sum the
appropriate 3 values in column D.
If G2="First", the answer would be 10+5+2=17. If G2="Second", the answer
would be 20+10+4=34. If G2="Third", the answer would be 30+15+6=51.
Please help!
|