Groupings

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Greetings,

I have a chart that looks a little like this:

a b
1 bob 1
2 joe 1
3 harry 2
4 joe 2
5 bob 1

....etc.

Is it possible for me to have a cell that is a sum of every cell in the
column "b" where the name in column "a" is "joe"? In the above example,
the correct answer would be 3 (because b2 plus b4).

Thanks in advance!

Regards,
Jason
 
Jason

you need to use SUMIF

For example:

=SUMIF(A:A,"bob",B:B)

Regards

Trevor
 
Jason said:
Greetings,

I have a chart that looks a little like this:

a b
1 bob 1
2 joe 1
3 harry 2
4 joe 2
5 bob 1

...etc.

Is it possible for me to have a cell that is a sum of every cell in the
column "b" where the name in column "a" is "joe"? In the above example,
the correct answer would be 3 (because b2 plus b4).

{=SUM((A1:A5="joe")*B1:B5)}

Hi, this is an array formula, so don't place the brackets {} when
typing, enter the formula not by simply pressing enter, instead you must
press CTRL+SHIFT+ENTER.

Regards,
 
Back
Top