excelvbarowfiltered

Select next visible row (like pressing {down})


I've done a ton of reseach and I've found a code that worked partially for me.
All I want is a code that simply go to the next cell below but the rows are filtered.
The problem with this code is that it goes to the very first row (header) and then it offsets to the next below line.

With ActiveSheet.AutoFilter.Range
    Range("E" & .Offset(1, 0).SpecialCells(xlCellTypeVisible)(1).Row).Select
End With

I hope the code does this, but the rows are not consecutives:


Solution

  • I spent all night google-ing and reading docs about Do While with the idea of using ActiveCell.EntireRow.Hidden = True and there's the final idea:

    ActiveCell.Offset(1, 4).Activate 'because I want to activate column "E"
    Do While ActiveCell.EntireRow.Hidden = True
      ActiveCell.Offset(1, 0).Activate
    Loop