Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help required to select a cell in a filtered list
Windows XP and Excel 2003
I have filtered some rows of data and would like to move the active cell sequentially down the list. Equivalent to using the cursor down key ... Is this possible with vba Regards & TIA |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help required to select a cell in a filtered list
I'd just look for a row that's visible:
Option Explicit Sub testme() Dim iRow As Long Dim FirstRow As Long Dim LastRow As Long Dim CurRow As Long CurRow = ActiveCell.Row With ActiveSheet.AutoFilter.Range FirstRow = .Row LastRow = .Rows(.Rows.Count).Row End With If CurRow = LastRow _ Or CurRow < FirstRow Then MsgBox "not in the autofilter range--or out of room!" Exit Sub End If Do If ActiveCell.Row = LastRow Then Exit Do 'at the bottom of the range End If ActiveCell.Offset(1, 0).Select If ActiveCell.Row LastRow Then MsgBox "Out of the autofilter range!" Exit Do End If If ActiveCell.EntireRow.Hidden = True Then 'keep looking Else Exit Do End If Loop End Sub Jim wrote: Windows XP and Excel 2003 I have filtered some rows of data and would like to move the active cell sequentially down the list. Equivalent to using the cursor down key ... Is this possible with vba Regards & TIA -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Randomly Select cell from filtered list | Excel Worksheet Functions | |||
select random sample of records in a filtered list | Excel Discussion (Misc queries) | |||
SELECT THE FIRST CELL IN ADVANCE FILTERed worksheet vba code | Excel Programming | |||
How do I select the first cell of a filtered list? | Excel Worksheet Functions | |||
Select data in filtered list | Excel Discussion (Misc queries) |