View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff Biff is offline
external usenet poster
 
Posts: 1,688
Default Hi and function help please

Hi!

Try this:

=SUMPRODUCT(--(A2:A9="Sam"),--(B2:B9="Apple"))

Better to use cells to hold the criteria:

D1 = Sam
E1 = Apple

=SUMPRODUCT(--(A2:A9=D1),--(B2:B9=E1))

Biff

wrote in message ...
My worksheet looks likes this:

A B
1 Name Fruit
2 Sam Apple
3 Sam Apple
4 Sam Apple
5 Sam Orange
6 Jane Orange
7 Jane Apple
8 Jim Orange
9 Jim Orange

I would like a function/formula that tells me how many Apples Sam has.

thank you!