Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro That Moves Cursor Down
When recording a macro to capture keystrokes, how do I get the curso
(or active cell) to be at the next blank cell at the bottom of column of data? In other words, when I use End+Down and then move the arrow key dow one more cell, the macro record function identifies that cell by name such as A24, rather than End+Down and then Down. Thanks for your expertise -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro That Moves Cursor Down
Hi
(or active cell) to be at the next blank cell at the bottom of a column of data? Two ways Range("A" & Rows.Count).End(xlUp)(2).Select Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Select -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "job1job1 " wrote in message ... When recording a macro to capture keystrokes, how do I get the cursor (or active cell) to be at the next blank cell at the bottom of a column of data? In other words, when I use End+Down and then move the arrow key down one more cell, the macro record function identifies that cell by name, such as A24, rather than End+Down and then Down. Thanks for your expertise. --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro That Moves Cursor Down
ActiveCell.End(xldown).Select
if Activecell.row < 65536 then Activecell.offset(1,0).Select else ActiveCell.End(xlup).Offset(1,0).Select End if or if isempty(activeCell.Offset(1,0)) then Activecell.offset(1,0).Select else ActiveCell.End(xldown).Offset(1,0).Select End if -- Regards, Tom Ogilvy "job1job1 " wrote in message ... When recording a macro to capture keystrokes, how do I get the cursor (or active cell) to be at the next blank cell at the bottom of a column of data? In other words, when I use End+Down and then move the arrow key down one more cell, the macro record function identifies that cell by name, such as A24, rather than End+Down and then Down. Thanks for your expertise. --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro That Moves Cursor Down
job
Sub select_last_plus_one() Dim rng As Range Set rng = Cells(Rows.Count, 1).End(xlUp)(2) 'or .End(xlUp).Offset(1, 0) rng.Select End Sub The (Rows.Count, 1) denotes column A Gord Dibben Excel MVP On Mon, 16 Feb 2004 13:47:46 -0600, job1job1 wrote: When recording a macro to capture keystrokes, how do I get the cursor (or active cell) to be at the next blank cell at the bottom of a column of data? In other words, when I use End+Down and then move the arrow key down one more cell, the macro record function identifies that cell by name, such as A24, rather than End+Down and then Down. Thanks for your expertise. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Tab key oly moves cursor to left | Excel Discussion (Misc queries) | |||
move cursor on one sheet moves cursor on all sheets | Excel Discussion (Misc queries) | |||
Page moves instead of cursor | Excel Discussion (Misc queries) | |||
Cursor stays still, page moves | Excel Discussion (Misc queries) | |||
My entire sheet moves instead of the cursor. What to do? | Excel Discussion (Misc queries) |