How to select the first visible row after applying a filter
问题 I'm filtering a table in Excel but I only want the first line that appears. 回答1: Use Range.SpecialCells method with the xlCellTypeVisible parameter on the filtered range. .Rows(1).Cells should be what you want. Sub first_row() Dim rFirstFilteredRow As Range With Worksheets("Sheet1") With .Cells(1, 1).CurrentRegion 'do all the .autofilter stuff here With .Resize(.Rows.Count - 1, .Columns.Count).Offset(1, 0) If CBool(Application.Subtotal(103, .Cells)) Then Set rFirstFilteredRow = _