Thread: Down One Row
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 698
Default Down One Row

Try something like this:

Sub DownToNextVisibleCell()
Dim lngCtr As Long
Dim lngCurrCol As Long

lngCurrCol = ActiveCell.Column

For lngCtr = ActiveCell.Row + 1 To Rows.Count
With Cells(RowIndex:=lngCtr, ColumnIndex:=lngCurrCol)
If .EntireRow.Hidden = False Then
.Select
Exit For
End If
End With
Next lngCtr
End Sub


Is that something you can work with?
***********
Regards,
Ron

XL2003, WinXP


"Mike H." wrote:

Usually I can navigate a spreadsheet by getting the row # and going down 1 row:
x=activecell.row
x=x+1
cells(x,1).select
So if I was on row 25 now I am on row 26. But what if the data is filtered
and row 26 is not in the filter. I want to go down 1 row but how can I know
which row that is?