Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Good morning,
This one has been giving me nightmares! I'm using Excel 2003 and am trying to do the following - I have a spread sheet which lists all customers, their representatives names and what products they buy. EG: A B C D E 1. REP CUST PCT 1 PCT 2 PCT 3 2. John Cust 1 2 1 "" 3. John Cust 2 "" 2 5 4. Jack Cust 3 3 "" 1 5. John Cust4 "" 1 "" (""= blank cells) And on another sheet I have a table which is populated by using 3 drop down boxes. For example - a user can select a representatives name and two products and see some summary details populate in the cells below. I've been trying to find a way to add to this, a formula which will look up all the entries for one representative, and then count how many customers they have for the two products selected. Ie - If I searched for John and wanted to see results for products 1 & 2, the correct result would be 3. (3 customers) So far I've only been able to find a way to count each time a product is recorded - so when searching for John and Products 1 and 2 - I currently get a 4. I would appreciate any and all help on this. Thank you for your time. Kind Regards Leanne |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
What you need to do is have the data first sorted in ascending order. This is what you will see REP CUST PCT 1 PCT 2 PCT 3 Jack Cust 3 3 1 John Cust 1 2 1 John Cust 4 1 John Cust 2 2 5 The you need to select the entire table go to DataSubtotals. In Subtotal select each change in Rep and use function Count. Then check the Cust check box. Do not forget to uncheck the check box that says replace the earlier subtotals. say ok This will give you the desired result. To give this to a user you need to make the subtotals first and then you can give them a copy of your work sheet. -- Thanks Suleman Peerzade "Leanne at Work" wrote: Good morning, This one has been giving me nightmares! I'm using Excel 2003 and am trying to do the following - I have a spread sheet which lists all customers, their representatives names and what products they buy. EG: A B C D E 1. REP CUST PCT 1 PCT 2 PCT 3 2. John Cust 1 2 1 "" 3. John Cust 2 "" 2 5 4. Jack Cust 3 3 "" 1 5. John Cust4 "" 1 "" (""= blank cells) And on another sheet I have a table which is populated by using 3 drop down boxes. For example - a user can select a representatives name and two products and see some summary details populate in the cells below. I've been trying to find a way to add to this, a formula which will look up all the entries for one representative, and then count how many customers they have for the two products selected. Ie - If I searched for John and wanted to see results for products 1 & 2, the correct result would be 3. (3 customers) So far I've only been able to find a way to count each time a product is recorded - so when searching for John and Products 1 and 2 - I currently get a 4. I would appreciate any and all help on this. Thank you for your time. Kind Regards Leanne |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
The result would be
REP CUST PCT 1 PCT 2 PCT 3 Jack Cust 3 3 1 Jack Count 1 John Cust 1 2 1 John Cust 4 1 John Cust 2 2 5 John Count 3 Grand Count 4 -- Thanks Suleman Peerzade "Leanne at Work" wrote: Good morning, This one has been giving me nightmares! I'm using Excel 2003 and am trying to do the following - I have a spread sheet which lists all customers, their representatives names and what products they buy. EG: A B C D E 1. REP CUST PCT 1 PCT 2 PCT 3 2. John Cust 1 2 1 "" 3. John Cust 2 "" 2 5 4. Jack Cust 3 3 "" 1 5. John Cust4 "" 1 "" (""= blank cells) And on another sheet I have a table which is populated by using 3 drop down boxes. For example - a user can select a representatives name and two products and see some summary details populate in the cells below. I've been trying to find a way to add to this, a formula which will look up all the entries for one representative, and then count how many customers they have for the two products selected. Ie - If I searched for John and wanted to see results for products 1 & 2, the correct result would be 3. (3 customers) So far I've only been able to find a way to count each time a product is recorded - so when searching for John and Products 1 and 2 - I currently get a 4. I would appreciate any and all help on this. Thank you for your time. Kind Regards Leanne |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Wed, 30 Jul 2008 04:03:01 -0700, Suleman Peerzade
wrote: The result would be REP CUST PCT 1 PCT 2 PCT 3 Jack Cust 3 3 1 Jack Count 1 John Cust 1 2 1 John Cust 4 1 John Cust 2 2 5 John Count 3 Grand Count 4 This shows that the REP John has three customers in total. But the question was to count the customers for a selected rep "for the two products selected". If product PCT 1 and PCT 3 are selected (on the other worksheet) the expected result would be 2, as John has only two customers, Cust 1 and Cust 2 for the selected products. Your subtotal solution does not show how to take care of "the two product selected". Or am I missing something here? Lars-Åke |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count age ranges | Excel Worksheet Functions | |||
Name ranges and Lookup | Excel Worksheet Functions | |||
count age ranges | Excel Discussion (Misc queries) | |||
Lookup Value between 2 ranges | Excel Worksheet Functions | |||
Ranges with in a LOOKUP | Excel Worksheet Functions |