Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to use an arrow key in a macro to move to the next row down. The
"offset" command is of no use because I have filtered the rows by this stage and it lands the cursor in a filtered out row, rather than the next visible row down. I suspect that if I can find out how to use the "End(x1down)" without the "End" it will operate only across the visible rows, because "End(x1down)" does . Does anyone know the answer to the problem? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about a quick macro to select the next visible cell below the
activecell? Sub NextFilterCell() Dim i As Long i = 1 For i = 1 To 655536 If Not ActiveCell.Offset(i, 0).EntireRow.Hidden Then ActiveCell.Offset(i, 0).Select Exit Sub Else i = i + 1 End If Next i End Sub Mike F "Kevryl" wrote in message ... I need to use an arrow key in a macro to move to the next row down. The "offset" command is of no use because I have filtered the rows by this stage and it lands the cursor in a filtered out row, rather than the next visible row down. I suspect that if I can find out how to use the "End(x1down)" without the "End" it will operate only across the visible rows, because "End(x1down)" does . Does anyone know the answer to the problem? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Mike, that works fine! I knew there must be a way.
Regards, Keith "Mike Fogleman" wrote: How about a quick macro to select the next visible cell below the activecell? Sub NextFilterCell() Dim i As Long i = 1 For i = 1 To 655536 If Not ActiveCell.Offset(i, 0).EntireRow.Hidden Then ActiveCell.Offset(i, 0).Select Exit Sub Else i = i + 1 End If Next i End Sub Mike F "Kevryl" wrote in message ... I need to use an arrow key in a macro to move to the next row down. The "offset" command is of no use because I have filtered the rows by this stage and it lands the cursor in a filtered out row, rather than the next visible row down. I suspect that if I can find out how to use the "End(x1down)" without the "End" it will operate only across the visible rows, because "End(x1down)" does . Does anyone know the answer to the problem? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just another option to select the next visible cell down:
Range(ActiveCell(2), Cells(65536, ActiveCell.Column)). _ SpecialCells(12).Areas(1).Cells(1).Select -- HTH. :) Dana DeLouis Windows XP, Office 2003 "Kevryl" wrote in message ... Thanks Mike, that works fine! I knew there must be a way. Regards, Keith "Mike Fogleman" wrote: How about a quick macro to select the next visible cell below the activecell? Sub NextFilterCell() Dim i As Long i = 1 For i = 1 To 655536 If Not ActiveCell.Offset(i, 0).EntireRow.Hidden Then ActiveCell.Offset(i, 0).Select Exit Sub Else i = i + 1 End If Next i End Sub Mike F "Kevryl" wrote in message ... I need to use an arrow key in a macro to move to the next row down. The "offset" command is of no use because I have filtered the rows by this stage and it lands the cursor in a filtered out row, rather than the next visible row down. I suspect that if I can find out how to use the "End(x1down)" without the "End" it will operate only across the visible rows, because "End(x1down)" does . Does anyone know the answer to the problem? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Arrow Keys | Excel Discussion (Misc queries) | |||
Arrow Keys | Excel Discussion (Misc queries) | |||
Arrow keys | Excel Programming | |||
how to use shift and down arrow keys in a macro? | Excel Worksheet Functions | |||
macro equivalent to arrow keys | Excel Programming |