How can I count the results ???

M

Mark Allen

ok the excel loks like this

A1 A2
Sue Apples
Chris Apples
John Pears
Sue Apples
Chris Apples

How do I write a formula to give me the answer to how many Apples has Sue
got ??

The answer is two but what is the formula ???????

Any help would be welcome
 
R

Ron Coderre

With

Your posted data in cells A1:B5

Try this:
D1: Sue
E1: Apples
This formula returns the count of Sue/Apples combinations
F1: =SUMPRODUCT((A1:A5=D1)*(B1:B5=E1))

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
D

driller

try this..
=SUM((A1:A5=C1)*(B1:B5=D1)) and hit control-shift-enter

see also help files on Arrays...
 
Top