Summing Question

J

Jimmy

I have a question:

If I have two columns such as:

9.5 2
3.6 3
14 1
22 1
8 2
9 3
7 1

How would I sum all of the numbers in column A that correspond with a
1 in column B? Of course I want to the same for 2, and 3 also.

Thanks.
 
J

joeu2004

If I have two columns such as:
9.5 2
3.6 3
14 1
22 1
8 2
9 3
7 1
How would I sum all of the numbers in column A that correspond with a
1 in column B?

=SUMIF(B1:B7, "=1", A1:A7)
 
M

Max

Assuming data in cols A and B, from row1 down
(and assuming you really have numbers: 1,2,3,... in col B)

Put in C1: =ROW()
Put in D1: =SUMIF(B:B,C1,A:A)
Select C1:D1, copy down as far as required.
Col D returns the required summation results for the numbers in col C
 
Top