counting

G

Guest

Hi all,

I have a counting issue. Let's assume the follwing data set:

¦ A ¦ B ¦
---------------------------
1¦ a ¦ 2 ¦
2¦ b ¦ 1 ¦
3¦ a ¦ 5 ¦
4¦ c ¦ 2 ¦
5¦ b ¦ 2 ¦


Result:
a 7
b 3
c 2

How can I get this done with a formula? I have tried with countif but it did
not work.

Kind regards,

Simon
 
G

Guest

hi
from what you posted, you're not counting. you're summing.
use the sumif
=sumif(criteria range,"criteria",sum range)
you would need a sumif for each criteria. you can then sum the sumif's for a
grand total.

regards
FSt1
 
G

Guest

=Sumif($A$1:$A$5, "a", $B$1:$B$5)

or use a cell reference for your criteria. assuming "a" (w/o quotes) is in C1
=Sumif($A$1:$A$5, C1, $B$1:$B$5)
 

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