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
 
This works..

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

The older form should also work, that is, return a number. Knowing that ROW(O2) --> {2} is processible because SumProduct operates on arrays has led me to drop MIN from this type of formula expression (crafted by Longre originally). It can be even written as:

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

Note that the never expression is also set up in SumProduct's native comma syntax.
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,224,547
Messages
6,179,436
Members
452,915
Latest member
hannnahheileen

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