Sum of rows in different columns

E

envy

Help!
I have two columns A and B. A1 has a large number of rows with fruit. I
want one cell to sum all the values in B if A is a specific text. For
example, when column A states Apples, I want the sum of column B for the rows
that Apples appear on column A.
A B
Kiwi 20
Apples 12
Pears 5
Apples 10
....

Sum of Apples = 22

The reason why I don't sum it is that there is a large number of rows and I
need that value for another worksheet. Any help?

Thanks much out there?
 
R

ryguy7272

Here's a couple more...
=SUM(SUMIF(A1:A5,{"Apples"},B1:B5))
=SUMPRODUCT(--(A1:A4="Apples"),B1:B4)

HTH,
Ryan---
 

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