ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Searching for 2 values and returning the sum... (https://www.excelbanter.com/excel-discussion-misc-queries/212969-searching-2-values-returning-sum.html)

leekesm

Searching for 2 values and returning the sum...
 
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?

Max

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?


David Biddulph[_2_]

Searching for 2 values and returning the sum...
 
SUMPRODUCT
--
David Biddulph

"leekesm" wrote in message
...
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?





All times are GMT +1. The time now is 11:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com