Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Sumif, unique counts,

Hi Excel Gurus;

I have another problem. I have 2 worksheets - data source and a
summary worksheet.

The source data worksheet has the following data :

A B
Customer 1 Product 1
Customer 2 Product 2
Customer 7 Product 2
Customer 5 Product 2
Customer 3 Product 2
Customer 2 Product 2
Customer 2 Product 3
Customer 3 Product 4
Customer 4 Product 4
Customer 4 Product 4

In the summary worksheet, I have the following summary worksheet:-

Type of Product No. of unique customers who bought
Product 1
Product 2
Product 3
Product 4

What formula can I use in the summary worksheet to derive the no. of
unique customer counts for each product. E.g for product 2, there are
5 records but there are only 4 unique customers? I tried sumif but dun
know how to get the formula to do unique count only. Appreciate your
advise. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Sumif, unique counts,

Hello Chin

Sometimes a simple solution is the best solution.

I did the following using a pivot table in less than 30 seconds.

Customer 1 1
Customer 2 3
Customer 3 2
Customer 4 2
Customer 5 1
Customer 7 1

Is that what you wanted? Maybe I did no understand your question.

The Pivot Table can also detail by products. Here I removed the total per
row and column for simplicity.

Product 1 Product 2 Product 3 Product 4
Customer 1 1 0 0 0
Customer 2 0 2 1 0
Customer 3 0 1 0 1
Customer 4 0 0 0 2
Customer 5 0 1 0 0
Customer 7 0 1 0 0

Did that help?

--
Daniel


"Chin Huat" wrote:

Hi Excel Gurus;

I have another problem. I have 2 worksheets - data source and a
summary worksheet.

The source data worksheet has the following data :

A B
Customer 1 Product 1
Customer 2 Product 2
Customer 7 Product 2
Customer 5 Product 2
Customer 3 Product 2
Customer 2 Product 2
Customer 2 Product 3
Customer 3 Product 4
Customer 4 Product 4
Customer 4 Product 4

In the summary worksheet, I have the following summary worksheet:-

Type of Product No. of unique customers who bought
Product 1
Product 2
Product 3
Product 4

What formula can I use in the summary worksheet to derive the no. of
unique customer counts for each product. E.g for product 2, there are
5 records but there are only 4 unique customers? I tried sumif but dun
know how to get the formula to do unique count only. Appreciate your
advise. Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default Sumif, unique counts,

Hello Chin,

Select a sufficiently long range with 2 colums and array-enter:
=Pfreq(Pfreq(B1:B999,A1:A999))

Pfreq you can find he
http://sulprobil.com/html/pfreq.html

Regards,
Bernd
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 265
Default Sumif, unique counts,

Assuming that A2:B11 contains the data, and D2:D5 contains Product 1,
Product 2, etc., try...

E2, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=SUM(IF(FREQUENCY(IF($B$2:$B$11=D2,IF($A$2:$A$11< "",MATCH("~"&$A$2:$A$11
,$A$2:$A$11&"",))),ROW($A$2:$A$11)-ROW($A$2)+1),1))

--
Domenic
Microsoft Excel MVP
www.xl-central.com
Your Quick Reference to Excel Solutions

In article
,
Chin Huat wrote:

Hi Excel Gurus;

I have another problem. I have 2 worksheets - data source and a
summary worksheet.

The source data worksheet has the following data :

A B
Customer 1 Product 1
Customer 2 Product 2
Customer 7 Product 2
Customer 5 Product 2
Customer 3 Product 2
Customer 2 Product 2
Customer 2 Product 3
Customer 3 Product 4
Customer 4 Product 4
Customer 4 Product 4

In the summary worksheet, I have the following summary worksheet:-

Type of Product No. of unique customers who bought
Product 1
Product 2
Product 3
Product 4

What formula can I use in the summary worksheet to derive the no. of
unique customer counts for each product. E.g for product 2, there are
5 records but there are only 4 unique customers? I tried sumif but dun
know how to get the formula to do unique count only. Appreciate your
advise. Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sumif, unique counts,

see your other post

--
Biff
Microsoft Excel MVP


"Chin Huat" wrote in message
...
Hi Excel Gurus;

I have another problem. I have 2 worksheets - data source and a
summary worksheet.

The source data worksheet has the following data :

A B
Customer 1 Product 1
Customer 2 Product 2
Customer 7 Product 2
Customer 5 Product 2
Customer 3 Product 2
Customer 2 Product 2
Customer 2 Product 3
Customer 3 Product 4
Customer 4 Product 4
Customer 4 Product 4

In the summary worksheet, I have the following summary worksheet:-

Type of Product No. of unique customers who bought
Product 1
Product 2
Product 3
Product 4

What formula can I use in the summary worksheet to derive the no. of
unique customer counts for each product. E.g for product 2, there are
5 records but there are only 4 unique customers? I tried sumif but dun
know how to get the formula to do unique count only. Appreciate your
advise. Thanks.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to do summation of unique counts based on another variable? Chin Huat Excel Worksheet Functions 3 August 20th 09 05:57 PM
average daily counts to weekly counts Dave Excel Discussion (Misc queries) 0 June 17th 08 06:24 PM
counts Arvind Mahto Excel Discussion (Misc queries) 3 May 23rd 08 03:27 PM
Counts of unique keys in a list gazza67 Excel Discussion (Misc queries) 6 January 29th 07 09:53 AM
Sumif only unique items Jay Excel Discussion (Misc queries) 0 August 9th 06 04:42 PM


All times are GMT +1. The time now is 05:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"