View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Counting text in two different columns

Try this:

=SUMPRODUCT(--(A1:A10="Jon"),--(B1:B10="apples"))

Better to use cells to hold the criteria:

D1 = Jon
E1 = apples

=SUMPRODUCT(--(A1:A10=D1),--(B1:B10=E1))

--
Biff
Microsoft Excel MVP


"Robert" wrote in message
...
I'm trying to create a formula to count text in two different columns for
instance:

Samle work sheet:

A B
Jon apples
Jo apples
Jon grapes
Jon apples
Jo apples
Jon oranges
Eric apples
Jo apples

I want a formula that would show me how many "apples" Jon has. Please
help!
Thanks