How do I count rows in a filtered list when using AutoFilter?

G

Guest

I have a database list in Excel spreadsheet and use the AutoFilter to look at
selected items. How can I count the number of rows with data that are
displayed when the worksheet is filtered, similar to SUBTOTAL does when a
column has numbers in it?
 
G

Guest

Try this:
Use 3 for the first argument in the SUBTOTAL function....it counts non-blank
cells in the filtered list. Remember to either skip the header row or
subtract 1 from the formula result.

Example:
=SUBTOTAL(3,A2:A10)

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro
 
G

Guest

If your filtered data (absent the header row) is in G2:G5, for example, then
=SUBTOTAL(3,G2:G5) will count the number of non-blanks in those cells which
passed the filter.
 
A

Ashish Mathur

Hi,

The SUBTOTAL(9,range) shoud work on the filtered data. I wonder why you get
a 0 value. Could you share more details

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
 
R

RichUE

I'm using COUNTBLANK now as it seems more reliable.

On the same column of unfiltered data:
=SUBTOTAL(109, ...) gives 0
=SUBTOTAL(103, ...) gives 130
=COUNTBLANK(...) gives 45.
 

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