PDA

View Full Version : Autofilter count



ProteanBeing
01-21-2008, 02:28 PM
Is there a way to count the number of rows filtered?

mikerickson
01-21-2008, 03:13 PM
Perhaps something likeWith ActiveSheet.UsedRange
MsgBox (.Rows.Count - .SpecialCells(xlCellTypeVisible).Rows.Count) & " rows are hidden."
End With

Bob Phillips
01-21-2008, 05:04 PM
Why not just

=SUBTOTAL(103,filtered_column)-1

ProteanBeing
01-21-2008, 07:20 PM
I am trying to do this in the code.

application.worksheetfunction.subtotal(103, filtered_column)

does not work

2 and 3 don't get the correct results.

Bob Phillips
01-22-2008, 01:32 AM
It works fine for me in code.