ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Auto Filter (https://www.excelbanter.com/excel-worksheet-functions/78613-auto-filter.html)

Worker Bee

Auto Filter
 
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!!!

Dave Peterson

Auto Filter
 
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


Worker Bee wrote:

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!!!


--

Dave Peterson


All times are GMT +1. The time now is 01:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com