View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Select the next row

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
'<<==============


---
Regards,
Norman



"Glen Mettler" wrote in message
...

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