In VBA, I wish to find the row count of a filtered column, so I wrote VBA code as
FilteredRowCount = ActiveSheet.UsedRange.SpecialCells(xlCellTypeVisible).Rows.
Do like this
Sub test() Dim Ws As Worksheet Dim rngDB As Range Dim r As Integer Dim rng As Range Set Ws = ActiveSheet Set rngDB = Ws.UsedRange.SpecialCells(xlCellTypeVisible) For Each rng In rngDB.Areas r = r + rng.Rows.Count Next rng MsgBox r End Sub