Count filtered column

Spraggs

Well-known Member
Joined
Jan 19, 2007
Messages
704
How do I count the number of times the letter "H" appears in a column when the column is filtered?
Thank you
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Is the 'H' the filter applied?
If so you can use =COUNTIF(B:B, "H") to count the number of rows irrespective of the filter. (Change B:B to be your chosen column, and it'll be faster if you use the exact range not the full column).

Adam
 
Upvote 0
Hi

what are you filtering in column E?

e.g if you are filtering A in column E, try:

=SUMPRODUCT((E1:E100="A")*(O1:O100="H"))
 
Last edited:
Upvote 0
Column E is a list of areas, hence when filtered doesn't show all rows.
Once filtered I want to count the remaining cells in column O that contains H
 
Last edited:
Upvote 0
Don't think I'm explaining very well....
I have a spreadsheet A1:O3389
Any column from A:N can be filtered
In column O (O2:O3389) is entered either "L" "H" or "P"
When one of the columns (or multiple) are filtered I want to count how many "H"s are left in column O.

Hope this is clearer.
 
Upvote 0
I found old post from Aladin Akyurek:

Try this:

=SUMPRODUCT(SUBTOTAL(3,OFFSET(O2:O3389,ROW(O2:O3389)-MIN(ROW(O2:O3389)),,1))*(O2:O3389="H"))
 
Upvote 0
Danny, thanks for your time. This is returning TRUE and not a number. This all seems over complicated for what I'm after, is it not?
 
Upvote 0
This works..

=SUMPRODUCT(SUBTOTAL(3,OFFSET(O2:O3389,ROW(O2:O3389)-ROW(O2),0,1)),--(O2:O3389="H"))
 
Upvote 0

Forum statistics

Threads
1,224,534
Messages
6,179,391
Members
452,909
Latest member
VickiS

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