View Single Post
  #2  
Old December 9th, 2008, 02:44 PM posted to microsoft.public.excel.misc
Max
external usenet poster
 
Posts: 8,574
Default Searching for 2 values and returning the sum...

Sumproduct could be used, I believe.
Something like this
In D2: =sumproduct((b2:b100="Table1")*(c2:c100="Soup"))
will count the number of occurrences of "Table1" in col B with "Soup" in col C
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:365 Subscribers:65
xdemechanik
---
"leekesm" wrote:
I quite often have this problem, and I have never come up with a solution...

In this example I have customers coming to our restaurant at Christmas. We
have food orders for each customer. I want to be able to look for all the
customers sat on table 1 (in one column) and count how many people want (for
example) soup (in another column). Any obvious functions I am missing?