Select the next row

  • Thread starter Thread starter Glen Mettler
  • Start date Start date
G

Glen Mettler

How can I select the next row in a filtered condition?
For example - I have a filter set that shows:
Row 1& 2 (header rows)
Row 4 - data row
Row 10 - data row

If I use Activecell.offset(1,0).select, I get row 3
I need to be able to select the next visible row (in this case row 4) in the
same way that I can do it if I press the down arrow
but I need to do it programmatically.

Any ideas?

Glen
 
Hi Glen.

Try the following which was suggested by Tom Ogilvy:

'==============>>
Sub SelectNextVisible()
Dim Rng As Range

Set Rng = Range(ActiveCell.Offset(1), _
ActiveCell.Offset(1).End(xlDown)). _
SpecialCells(xlVisible)
Rng(1).Select

End Sub
'<<==============
 
Back
Top