Auto Filter

W

Worker Bee

How do I capture the value that is shown on the bottom left corner after I
perform a filter function. I need to use that number within a macro. Thanks
for the Help!!!
 
D

Dave Peterson

Are you Paputxi?

Option Explicit
Sub testme()

Dim TotalRows As Long
Dim VisibleRows As Long

With ActiveSheet.AutoFilter.Range.Columns(1)
'subtract the header from both
TotalRows = .Cells.Count - 1
VisibleRows = .Cells.SpecialCells(xlCellTypeVisible).Count - 1
End With

MsgBox VisibleRows & " of " & TotalRows & " records found"
End Sub
 
Top