Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Select the next row


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



  #2   Report Post  
Posted to microsoft.public.excel.programming
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA: Column Select then Data Select then return to cell A1 James C[_2_] Excel Discussion (Misc queries) 3 February 1st 10 11:35 AM
Using formulas to select cells (Ex: Select every nth cell in a col Lakeview Photographic Services Excel Discussion (Misc queries) 2 March 15th 07 02:17 PM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 5th 05 12:03 AM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 4th 05 11:59 PM
Select other workbook to select data in a macro. T Tromp Excel Programming 2 September 19th 03 01:43 PM


All times are GMT +1. The time now is 11:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"