Sum of rows in different columns

  • Thread starter Thread starter envy
  • Start date Start date
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?
 
Here's a couple more...
=SUM(SUMIF(A1:A5,{"Apples"},B1:B5))
=SUMPRODUCT(--(A1:A4="Apples"),B1:B4)

HTH,
Ryan---
 
Back
Top