I have used a auto-filter and want to count how many rows i have stil remaining
X xXx Apr 17, 2004 #1 I have used a auto-filter and want to count how many rows i have stil remaining
D Debra Dalgleish Apr 17, 2004 #3 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 '============================
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 '============================