Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default COUNTING UNIQUE ENTRIES IN FILTERATION

I had placed this type of question, as counting unique entries, around some
time back and some pals did try 2 help out with COUNTIF, but I guess I was
not clear enough or couldn't understand.

Lets have another example:

Subtotals help a lot to sum or count ONLY the "VISIBLE" cells appearing in
the "FILTERED" data.

Now the question is that when I filter the data, I want to count the
reoccuring entries appearing in one of the columns to be counted as once only
returning the number of unique entries only.

For example:

CASE BRANCH PRODUCT AMOUNT
==== ====== ====== ======
CASE1 BRANCH1 PROD1 293,297
CASE2 BRANCH1 PROD2 901,310
CASE3 BRANCH1 PROD3 572,292
CASE1 BRANCH1 PROD4 686,653
CASE2 BRANCH1 PROD1 758,984
CASE3 BRANCH2 PROD2 901,086
CASE1 BRANCH2 PROD3 494,941
CASE2 BRANCH2 PROD4 79,819
CASE3 BRANCH2 PROD1 649,114
CASE1 BRANCH2 PROD2 285,442
CASE2 BRANCH3 PROD3 340,301
CASE3 BRANCH3 PROD4 536,027
CASE1 BRANCH3 PROD1 652,562
CASE2 BRANCH3 PROD2 453,632
CASE3 BRANCH3 PROD3 775,057
CASE4 BRANCH3 PROD4 889,722

Upon filteration on the basis of BRANCH1 number of cases should be 3 only
(as CASE1 & CASE2 each occurring twice being counted once and CASE3 being
counted too therefore result being only 3).

Upon filteration on the basis of PROD4 number of cases should be 4 (as all
the cases are different and are 4 in number).

It would be preferable if you copy the data and paste on an XL sheet and try
out after applying Autofilter.

All the help and expertise shall be highly obliged.

Thanx in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default COUNTING UNIQUE ENTRIES IN FILTERATION

Assumptions:

A1:D1 = column headers
A2:D17 = data
No empty/blanks cells within the data area

Try this array formula** :

=SUM(--(FREQUENCY(IF(SUBTOTAL(3,OFFSET(A1,ROW(A2:A17)-1,,)),MATCH(A2:A17,A2:A17,0)),IF(SUBTOTAL(3,OFFSET (A1,ROW(A2:A17)-1,,)),MATCH(A2:A17,A2:A17,0)))0))



--
Biff
Microsoft Excel MVP


"FARAZ QURESHI" wrote in message
...
I had placed this type of question, as counting unique entries, around some
time back and some pals did try 2 help out with COUNTIF, but I guess I was
not clear enough or couldn't understand.

Lets have another example:

Subtotals help a lot to sum or count ONLY the "VISIBLE" cells appearing in
the "FILTERED" data.

Now the question is that when I filter the data, I want to count the
reoccuring entries appearing in one of the columns to be counted as once
only
returning the number of unique entries only.

For example:

CASE BRANCH PRODUCT AMOUNT
==== ====== ====== ======
CASE1 BRANCH1 PROD1 293,297
CASE2 BRANCH1 PROD2 901,310
CASE3 BRANCH1 PROD3 572,292
CASE1 BRANCH1 PROD4 686,653
CASE2 BRANCH1 PROD1 758,984
CASE3 BRANCH2 PROD2 901,086
CASE1 BRANCH2 PROD3 494,941
CASE2 BRANCH2 PROD4 79,819
CASE3 BRANCH2 PROD1 649,114
CASE1 BRANCH2 PROD2 285,442
CASE2 BRANCH3 PROD3 340,301
CASE3 BRANCH3 PROD4 536,027
CASE1 BRANCH3 PROD1 652,562
CASE2 BRANCH3 PROD2 453,632
CASE3 BRANCH3 PROD3 775,057
CASE4 BRANCH3 PROD4 889,722

Upon filteration on the basis of BRANCH1 number of cases should be 3 only
(as CASE1 & CASE2 each occurring twice being counted once and CASE3 being
counted too therefore result being only 3).

Upon filteration on the basis of PROD4 number of cases should be 4 (as all
the cases are different and are 4 in number).

It would be preferable if you copy the data and paste on an XL sheet and
try
out after applying Autofilter.

All the help and expertise shall be highly obliged.

Thanx in advance.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default COUNTING UNIQUE ENTRIES IN FILTERATION

YAHOO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
THANX!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

"T. Valko" wrote:

Assumptions:

A1:D1 = column headers
A2:D17 = data
No empty/blanks cells within the data area

Try this array formula** :

=SUM(--(FREQUENCY(IF(SUBTOTAL(3,OFFSET(A1,ROW(A2:A17)-1,,)),MATCH(A2:A17,A2:A17,0)),IF(SUBTOTAL(3,OFFSET (A1,ROW(A2:A17)-1,,)),MATCH(A2:A17,A2:A17,0)))0))



--
Biff
Microsoft Excel MVP


"FARAZ QURESHI" wrote in message
...
I had placed this type of question, as counting unique entries, around some
time back and some pals did try 2 help out with COUNTIF, but I guess I was
not clear enough or couldn't understand.

Lets have another example:

Subtotals help a lot to sum or count ONLY the "VISIBLE" cells appearing in
the "FILTERED" data.

Now the question is that when I filter the data, I want to count the
reoccuring entries appearing in one of the columns to be counted as once
only
returning the number of unique entries only.

For example:

CASE BRANCH PRODUCT AMOUNT
==== ====== ====== ======
CASE1 BRANCH1 PROD1 293,297
CASE2 BRANCH1 PROD2 901,310
CASE3 BRANCH1 PROD3 572,292
CASE1 BRANCH1 PROD4 686,653
CASE2 BRANCH1 PROD1 758,984
CASE3 BRANCH2 PROD2 901,086
CASE1 BRANCH2 PROD3 494,941
CASE2 BRANCH2 PROD4 79,819
CASE3 BRANCH2 PROD1 649,114
CASE1 BRANCH2 PROD2 285,442
CASE2 BRANCH3 PROD3 340,301
CASE3 BRANCH3 PROD4 536,027
CASE1 BRANCH3 PROD1 652,562
CASE2 BRANCH3 PROD2 453,632
CASE3 BRANCH3 PROD3 775,057
CASE4 BRANCH3 PROD4 889,722

Upon filteration on the basis of BRANCH1 number of cases should be 3 only
(as CASE1 & CASE2 each occurring twice being counted once and CASE3 being
counted too therefore result being only 3).

Upon filteration on the basis of PROD4 number of cases should be 4 (as all
the cases are different and are 4 in number).

It would be preferable if you copy the data and paste on an XL sheet and
try
out after applying Autofilter.

All the help and expertise shall be highly obliged.

Thanx in advance.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default COUNTING UNIQUE ENTRIES IN FILTERATION

You're welcome!

--
Biff
Microsoft Excel MVP


"FARAZ QURESHI" wrote in message
...
YAHOO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
THANX!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

"T. Valko" wrote:

Assumptions:

A1:D1 = column headers
A2:D17 = data
No empty/blanks cells within the data area

Try this array formula** :

=SUM(--(FREQUENCY(IF(SUBTOTAL(3,OFFSET(A1,ROW(A2:A17)-1,,)),MATCH(A2:A17,A2:A17,0)),IF(SUBTOTAL(3,OFFSET (A1,ROW(A2:A17)-1,,)),MATCH(A2:A17,A2:A17,0)))0))



--
Biff
Microsoft Excel MVP


"FARAZ QURESHI" wrote in message
...
I had placed this type of question, as counting unique entries, around
some
time back and some pals did try 2 help out with COUNTIF, but I guess I
was
not clear enough or couldn't understand.

Lets have another example:

Subtotals help a lot to sum or count ONLY the "VISIBLE" cells appearing
in
the "FILTERED" data.

Now the question is that when I filter the data, I want to count the
reoccuring entries appearing in one of the columns to be counted as
once
only
returning the number of unique entries only.

For example:

CASE BRANCH PRODUCT AMOUNT
==== ====== ====== ======
CASE1 BRANCH1 PROD1 293,297
CASE2 BRANCH1 PROD2 901,310
CASE3 BRANCH1 PROD3 572,292
CASE1 BRANCH1 PROD4 686,653
CASE2 BRANCH1 PROD1 758,984
CASE3 BRANCH2 PROD2 901,086
CASE1 BRANCH2 PROD3 494,941
CASE2 BRANCH2 PROD4 79,819
CASE3 BRANCH2 PROD1 649,114
CASE1 BRANCH2 PROD2 285,442
CASE2 BRANCH3 PROD3 340,301
CASE3 BRANCH3 PROD4 536,027
CASE1 BRANCH3 PROD1 652,562
CASE2 BRANCH3 PROD2 453,632
CASE3 BRANCH3 PROD3 775,057
CASE4 BRANCH3 PROD4 889,722

Upon filteration on the basis of BRANCH1 number of cases should be 3
only
(as CASE1 & CASE2 each occurring twice being counted once and CASE3
being
counted too therefore result being only 3).

Upon filteration on the basis of PROD4 number of cases should be 4 (as
all
the cases are different and are 4 in number).

It would be preferable if you copy the data and paste on an XL sheet
and
try
out after applying Autofilter.

All the help and expertise shall be highly obliged.

Thanx in advance.






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
Counting unique entries across two or three columns [email protected] Excel Worksheet Functions 17 February 17th 08 01:50 AM
Counting blank unique entries [email protected] Excel Worksheet Functions 5 November 27th 07 03:33 PM
Counting Unique Entries Tendresse Excel Discussion (Misc queries) 3 June 4th 07 08:19 AM
Counting unique entries DianeandChipps Excel Discussion (Misc queries) 1 October 14th 06 07:35 PM
Counting Unique Entries SouthCarolina Excel Discussion (Misc queries) 7 April 14th 06 01:18 PM


All times are GMT +1. The time now is 10:13 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"