View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default Sum of rows in different columns

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

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Per Jessen" wrote:

Hi

=SUMIF(A1:A4,"Apples",B1:B4)


Regards,
Per

On 4 Okt., 05:10, envy wrote:
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?
--
en