ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Tallying columns based on values of 2 different columns (https://www.excelbanter.com/excel-worksheet-functions/10658-tallying-columns-based-values-2-different-columns.html)

Mctabish

Tallying columns based on values of 2 different columns
 
I am setting up a reservations database.
These are based on tables (for seating, Not excel tables)
Each table can seat 11 people
Columns are
Seat Name Party# Paid Type

Each seat has the persons name, which party they are in, if they paid
(logical T/F) and what type of client (adult, child, or complementary)

I want to create a differant chart on the same worksheet (starting at H5)
I want these columns to be:
Party Number_Adults NumberChildren NumberComplimentary TotalAmount
totalPaid

What I need to figure out is how to count the numbers of adults in party1,
number of children in party 1, how many of the adults paid in party1 and how
many children paid in party1
I need to figure this out for each party....


Thanks
Mc



Ken Wright

=SUMPRODUCT(--(Party#=1),--(Type="Adult"))
=SUMPRODUCT(--(Party#=1),--(Type="Child"))
=SUMPRODUCT(--(Party#=1),--(Type="Complementary"))
=SUMPRODUCT(--(Party#=1),--(Type="Adult"),--(Paid="Yes"))
=SUMPRODUCT(--(Party#=1),--(Type="Child"),--(Paid="Yes"))

Substitute actual ranges for the Party#, Type, Paid bits. All ranges must
be identical in size.

http://www.xldynamic.com/source/xld.SUMPRODUCT.html

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Mctabish" wrote in message
...
I am setting up a reservations database.
These are based on tables (for seating, Not excel tables)
Each table can seat 11 people
Columns are
Seat Name Party# Paid Type
Each seat has the persons name, which party they are in, if they paid
(logical T/F) and what type of client (adult, child, or complementary)
I want to create a differant chart on the same worksheet (starting at H5)
I want these columns to be:
Party Number_Adults NumberChildren NumberComplimentary

TotalAmount
totalPaid

What I need to figure out is how to count the numbers of adults in party1,
number of children in party 1, how many of the adults paid in party1 and

how
many children paid in party1
I need to figure this out for each party....


Thanks
Mc






All times are GMT +1. The time now is 03:41 AM.

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