Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
carl
 
Posts: n/a
Default Counting Unique Cells When Spread Sheet is Filtered

I have a table like so:

ColA ColB
A 1
B 1
C 1
D 2
A 3
B 2
C 3

Is there a formula that I can place in ColA that will count the unique
cells, even when cColB is filtered

For example, if ColB is not filtered, the formula would count 4 unique cells
(A,B,C,D)

If ColB were filtered to 1, the formula would count 3 unique cells (A,B,C).

Thank you in advance.


  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Try

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

entered with ctrl + shift & enter

Assumes data starts in A2


Regards,

Peo Sjoblom

"carl" wrote:

I have a table like so:

ColA ColB
A 1
B 1
C 1
D 2
A 3
B 2
C 3

Is there a formula that I can place in ColA that will count the unique
cells, even when cColB is filtered

For example, if ColB is not filtered, the formula would count 4 unique cells
(A,B,C,D)

If ColB were filtered to 1, the formula would count 3 unique cells (A,B,C).

Thank you 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 cells in Excel? Kelly Lim Excel Discussion (Misc queries) 25 June 2nd 05 10:37 AM
Counting Colored cells in a database Kelly Lim Excel Discussion (Misc queries) 8 June 1st 05 12:10 PM
Counting cells, similar values SteW Excel Worksheet Functions 7 May 12th 05 08:05 PM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 0 April 7th 05 01:47 AM
counting cells with conditional formatting applied HalB Excel Discussion (Misc queries) 3 February 21st 05 02:21 PM


All times are GMT +1. The time now is 07:49 AM.

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"