Adding a column of numbers, with a condition

Y

yozzdi

I'd like to be able to create a cell which is the sum of the values i
column A, but only if the value of column B in the cell beside th
value in Column A is equal to some number (like = 12).

So that for this

col A col B
3 45
30 12
34 12

Sum of Column A where column B is also =12 would be 30+34 = 64

(I'd end up wanting a bunch of cells like this, using different number
instead of 12, ie another cell that has the sum of column A where colum
B is =11)

What's the best way to do this
 
B

Bob Phillips

=SUMIF(B:B,12,A:A)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
G

Guest

Hi there,

can even evolve it, replacing the "12" in the middle to a cell reference
c2: = SUMIF( B:B;a2;A:A)
C3: = SUMIF(C:C;a3;A:A) etc.

best regards,
ANdras
(Hungary)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top