Sum values referring to a cell with same value

G

ghnogueira

Hey. I want to know what's the easiest way of doing that... I'll try to
explain, it's simple

Let's say I have a table with many fruits in one cell, and the amount of
them on the cell next to them. I want to sum all the "pears" that are on my
table. How do I do it?

e.g.

A B
1 apple 5
2 pear 10
3 banana 8
4 pear 6
5 apple 6
6 pear 1

I want a cell that will give me 17 when the string looked for is pear
(B2+B4+B6), or 11 when it looks for apple (B1+B5)... hope it was easy to
understand
 
F

Farhad

Hi,

Try this:
A B
1 apple 5
2 pear 10
3 banana 8
4 pear 6
5 apple 6
6 pear 1


12 Apple =SUMIF($A$1:$A$6,A12,$B$1:$B$12)
13 Pear
14 Banana

and copy formula in cell B12 to B14 (in this example)

Thanks,
 

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