Count rows after filter

L

Learn-more

I want to count how many rows are left in the worksheet after I used filter
and some rows had been hidden. COUNTA give me all rows and not the one after
filter.
Are there any function can do that or need to use VBA?
Thank you.
 
H

Héctor Miguel

hi, anonymous !
I want to count how many rows are left in the worksheet after I used filter and some rows had been hidden.
COUNTA give me all rows and not the one after filter.
Are there any function can do that or need to use VBA?

subtotal(... worksheet-function only tracks visible cells/rows after any autofilter criteria so...

counting numbers: =subtotal(2,<filtered range>)
counting text/any: =subtotal(3,<filtered range>)

hth,
hector.
 
L

Learn-more

Hello,
Thank you. It work out good. I know subtotal can sum but forget/not realize
it can do counting etc too.

Thanks a lot.
Learn-more
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top