Filtered Count

  • Thread starter Thread starter Dean
  • Start date Start date
D

Dean

Hi,

I have an always changing list. This list is filtered to only show
what I want, how can I count the filtered list.

I've done a count of the range but it still counts everything, I only
want what is still visible.
Currently I have the list being copied to another sheet, counted and
the count being pasted back to the list sheet but this is time
consuming.

Thanks
Dean
 
Dean,

The following code counts the rows count of visible filtered range.

MsgBox ActiveSheet.AutoFilter.Range.Columns( _
1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
 
Dean

the SUBTOTAL function will work well for your filtered list. There is a
numerical argument that will give you not only the SUM of the filtered rows,
but several other statistical results including count. This comes in handy
in programming since you can get various kinds of information re: a subset
with only one change of an integer argument.

Check the help files for the list
 

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

Back
Top