A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Counting Unique Elements of filtered list with Blank Cells



 
 
Thread Tools Display Modes
  #1  
Old December 16th, 2003, 05:38 PM
Peo Sjoblom
external usenet poster
 
Posts: n/a
Default Counting Unique Elements of filtered list with Blank Cells

Daniel Maher posted this formula

=SUM(IF(SUBTOTAL(3,OFFSET(A2,ROW(A2:A100)-MIN(ROW(A2:A100)),,1)),(MMULT(((A2
:A100=TRANSPOSE(A2:A100)*TRANSPOSE(SUBTOTAL(3,OFFS ET(A2,ROW(A2:A100)-MIN(ROW
(A2:A100)),,1))))*(ROW(A2:A100)=TRANSPOSE(ROW(A2: A100)))),ROW(A2:A100)*0+1)
=1)*1))

entered with ctrl + shift & enter

change the range to your range

--

Regards,

Peo Sjoblom


"DOTjake" wrote in message
...
I am trying to sho the count of unique elements in a filtered column.
I can count the unique elements (text and number, excluding blanks) in the

entire range using the following:


=SUM(IF(FREQUENCY(IF(LEN($A$6:$A$10)0,MATCH($A$6: $A$10,$A$6:$A$10,0),""),IF
(LEN($A$6:$A$10)0,MATCH($A$6:$A$10,$A$6:$A$10,0), ""))0,1))

I got this from:
Microsoft Knowledge Base Article - 268001 Counting Unique Elements with

Blank Cells

My problem is that I have an autofilter on the column and would ike to see

the count for only the rows which show after the filter is applied.

I tried to use the subtotal function withoput any luck, although I'm not

sure I tried the right thing.

Any help is greatly appreciated.

TIA,
DOTjake



  #2  
Old December 16th, 2003, 09:51 PM
Aladin Akyurek
external usenet poster
 
Posts: n/a
Default Counting Unique Elements of filtered list with Blank Cells

=COUNTDIFF(IF(SUBTOTAL(3,OFFSET(A6,ROW(A6:A10)-MIN(ROW(A6:A10)),,1)),A6:A10)
)-1

which must be confirmed with control+shif+enter instead of just with enter.

The formula requires the morefunc.xll add-in
(http://longre.free.fr/english/index.html).

"DOTjake" wrote in message
...
I am trying to sho the count of unique elements in a filtered column.
I can count the unique elements (text and number, excluding blanks) in the

entire range using the following:


=SUM(IF(FREQUENCY(IF(LEN($A$6:$A$10)0,MATCH($A$6: $A$10,$A$6:$A$10,0),""),IF
(LEN($A$6:$A$10)0,MATCH($A$6:$A$10,$A$6:$A$10,0), ""))0,1))

I got this from:
Microsoft Knowledge Base Article - 268001 Counting Unique Elements with

Blank Cells

My problem is that I have an autofilter on the column and would ike to see

the count for only the rows which show after the filter is applied.

I tried to use the subtotal function withoput any luck, although I'm not

sure I tried the right thing.

Any help is greatly appreciated.

TIA,
DOTjake



  #3  
Old December 16th, 2003, 11:30 PM
Daniel.M
external usenet poster
 
Posts: n/a
Default Counting Unique Elements of filtered list with Blank Cells

Hi Aladin,

It will be off by 1 when the filter doesn't remove any rows (all rows
qualify). So instead of removing 1, remove 1 if COUNTA() and SUBTOTAL(3,) are
producing different values.

=COUNTDIFF(IF(SUBTOTAL(3,OFFSET(A6,ROW(A6:A10)-MIN(ROW(A6:A10)),,1)),
A6:A10))-(COUNTA(A6:A10)SUBTOTAL(3,A6:A10))

Regards,

Daniel M.

"Aladin Akyurek" wrote in message
...
=COUNTDIFF(IF(SUBTOTAL(3,OFFSET(A6,ROW(A6:A10)-MIN(ROW(A6:A10)),,1)),A6:A10)
)-1

which must be confirmed with control+shif+enter instead of just with enter.

The formula requires the morefunc.xll add-in
(http://longre.free.fr/english/index.html).

"DOTjake" wrote in message
...
I am trying to sho the count of unique elements in a filtered column.
I can count the unique elements (text and number, excluding blanks) in the

entire range using the following:


=SUM(IF(FREQUENCY(IF(LEN($A$6:$A$10)0,MATCH($A$6: $A$10,$A$6:$A$10,0),""),IF
(LEN($A$6:$A$10)0,MATCH($A$6:$A$10,$A$6:$A$10,0), ""))0,1))

I got this from:
Microsoft Knowledge Base Article - 268001 Counting Unique Elements with

Blank Cells

My problem is that I have an autofilter on the column and would ike to see

the count for only the rows which show after the filter is applied.

I tried to use the subtotal function withoput any luck, although I'm not

sure I tried the right thing.

Any help is greatly appreciated.

TIA,
DOTjake






  #4  
Old December 18th, 2003, 11:30 PM
Aladin Akyurek
external usenet poster
 
Posts: n/a
Default Counting Unique Elements of filtered list with Blank Cells

Daniel,

Good point.

Aladin

"Daniel.M" wrote in message
...
Hi Aladin,

It will be off by 1 when the filter doesn't remove any rows (all rows
qualify). So instead of removing 1, remove 1 if COUNTA() and SUBTOTAL(3,)

are
producing different values.

=COUNTDIFF(IF(SUBTOTAL(3,OFFSET(A6,ROW(A6:A10)-MIN(ROW(A6:A10)),,1)),
A6:A10))-(COUNTA(A6:A10)SUBTOTAL(3,A6:A10))

Regards,

Daniel M.

"Aladin Akyurek" wrote in message
...

=COUNTDIFF(IF(SUBTOTAL(3,OFFSET(A6,ROW(A6:A10)-MIN(ROW(A6:A10)),,1)),A6:A10)
)-1

which must be confirmed with control+shif+enter instead of just with

enter.

The formula requires the morefunc.xll add-in
(http://longre.free.fr/english/index.html).

"DOTjake" wrote in message
...
I am trying to sho the count of unique elements in a filtered column.
I can count the unique elements (text and number, excluding blanks) in

the
entire range using the following:



=SUM(IF(FREQUENCY(IF(LEN($A$6:$A$10)0,MATCH($A$6: $A$10,$A$6:$A$10,0),""),IF
(LEN($A$6:$A$10)0,MATCH($A$6:$A$10,$A$6:$A$10,0), ""))0,1))

I got this from:
Microsoft Knowledge Base Article - 268001 Counting Unique Elements

with
Blank Cells

My problem is that I have an autofilter on the column and would ike to

see
the count for only the rows which show after the filter is applied.

I tried to use the subtotal function withoput any luck, although I'm

not
sure I tried the right thing.

Any help is greatly appreciated.

TIA,
DOTjake








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.