Think you need to select visible cells
(Manual way is to select the column > press F5 > Special > Visible cells)
The below select the cells. Change as required
Dim Rng As Range
Dim LastRow As Long
Dim Cnt As Long
Dim N As Long
LastRow = Cells(Rows.Count, "E").End(xlUp).Row
Set Rng = Range("E1:E" & LastRow).SpecialCells(xlCellTypeVisible)
Cnt = Rng.Cells.Count
N = 10 'Number of rows
If Cnt >= N Then
Range("E1", Rng(LastRow - (Rng.Cells.Count - N))).Select
Else
Range("E1:E" & LastRow).Select
End If
VBA Noob
Bookmarks