I'm trying to select a range, which contains first 16 visible rows, after filtering.
Without applied filter it works ok.
Range("A1").AutoFilter
ActiveSheet.ListObjects("Empty_Locations").Range.AutoFilter Field:=3, Criteria1:=BrandSelection
ActiveSheet.ListObjects("Empty_Locations").Range.AutoFilter Field:=4, Criteria1:="<>Printed", Criteria2:="<>Occupied"
With ActiveSheet.Range("A1")
With .Offset(1, 0).Resize(Rows.Count - .Row, 1)
.SpecialCells(xlCellTypeVisible).Cells(1, 1).Select
End With
End With
Dim SelectedCell16 As Range
Set SelectedCell16 = Selection.Offset(15, 3).SpecialCells(xlCellTypeVisible)
ActiveSheet.Range(Selection, SelectedCell16).Select
I know that SpecialCells(xlCellTypeVisible) method is somehow involved but I can't get past it. Selection is totally wrong.
Help would be appreciated.