Hello all,

I have an Excel problem for which I don't even remotely know which way I could go to solve it. Hope someone of you knows...

I have a table of data, that contains the following information:

column A: A text string, one out of dozens (hundreds?) of alternatives, which aren't keyed anywhere else
column B: A number

Basically, like this (A;B):

apples; 5
peach; 20
banana; 34
lemon; 1
peach; 2
apples; 15
apples; 2

Now, I want to count the number of times a cell in column A is "apples", and the sum of the corresponding number in B.

Usually, I'd use =SUMPRODUCT((A1:A6=A1)*(B1:B6)), but as I said, I don't know which strings will appear in column A and how many different ones there will be each time I import data into the columns A and B.

Help?