How to countif visible cell in the filtered list

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Welcome to the forum.

FYI, a little detail goes a long way in helping someone figure out what you want, and could result in a better/faster answer.

If I understand your question, this might work:

BC
644
7
8
9ad
10ba
11aa

<tbody>
</tbody>
Sheet19

Worksheet Formulas
CellFormula
B6=COUNTIF(B9:C11,"a")

<tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
C6{=SUM((B9:C11="a")*(SUBTOTAL(103,OFFSET(B9,ROW(B9:C11)-ROW(B9),COLUMN(B9:C11)-COLUMN(B9)))))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



The basic COUNTIF is in B6. The same COUNTIF that only counts visible cells is in C6. If your range is just a single column, you can delete the underlined section.

Hope this helps.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,779
Messages
6,126,854
Members
449,345
Latest member
CharlieDP

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