View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Debra Dalgleish Debra Dalgleish is offline
external usenet poster
 
Posts: 2,979
Default counting filters?

You can count the visible rows:

http://www.contextures.com/xlautofilter03.html#Count

'========================
Sub CountVisRows()
'by Tom Ogilvy
Dim rng As Range
Set rng = ActiveSheet.AutoFilter.Range

MsgBox rng.Columns(1). _
SpecialCells(xlVisible).Count - 1 _
& " of " & Range("A1").CurrentRegion _
.Rows.Count - 1 & " Records"

End Sub
'============================

xXx < wrote:
I have used a auto-filter and want to count how many rows i have still
remaining.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html