Frequency value of filtered items

azizrasul

Well-known Member
Joined
Jul 7, 2003
Messages
1,304
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
When you use filtering in MS Excel, is there a way that would give the number of occurences of each filtered value?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi

Assuming you mean via VBA then yes - you could iterate thru the visible cells (ie filtered results) in your column of interest and store the count of each unique value. A Dictionary object is particularly suited to this task. Is this something you would like to explore?
 
Upvote 0
When you use filtering in MS Excel, is there a way that would give the number of occurences of each filtered value?

Like this?:
No
Letter
1
a
2
b
1
b
2
d
1
c
2
b
1
a
2
c

<TBODY>
</TBODY>

Filter by 2 in column A to get:
NoLetter
2b
2d
2b
2c

<COLGROUP><COL style="WIDTH: 48pt" span=2 width=64><TBODY>
</TBODY>


E1:b
F1:d
G1:c

In E2 copy accros:
=SUMPRODUCT(SUBTOTAL(2,OFFSET($A$2:A$10,ROW($A$2:$A$10)-MIN(ROW($A$2:$A$10)),,1)),--($B$2:$B$10=E1))
 
Upvote 0
When you filter on a particular header say First Name, you could get (when you filter) something like

Jones
Smith

What I'm looking for is

Jones 5
Smith 8

where there 5 occurences of Jones and 8 occurences of Smith. Either a solution using VBA or if there is a facility within Excel that already this that would also be good.
 
Upvote 0
If you got 5 Jones's in column and you filter by this Name the result will not change

What am I missing?
 
Upvote 0
When you filter on the column, you will only see Jones and Smith but there is no way of knowing how many Jones's and Smith's there are. Imagine I have 100,000 records with say 250 different surnames. How would I know what the breakup of each surname is by just filtering. The filter will simply give me the unique surnames not the number of thimes they occur. Hope that's clearer.
 
Upvote 0

Forum statistics

Threads
1,215,232
Messages
6,123,759
Members
449,120
Latest member
Aa2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top