SIMPLE MACRO!!!

  • Thread starter Thread starter Hugh Millen
  • Start date Start date
H

Hugh Millen

I would like to write a macro that moves the cursor down
one row, and then over to column J. I assume I am mixing a
relative reference with an absolute referance so that
moving one row down is relative, and moving over to column
J is absolute.

I tried writing a macro where I entered the "home" key
(which took me to the beginning of the row), then one
arrow key down (which obviously took me one row down), and
then the right arrow key nine times (which landed me in
column J where I wanted to be). I tried the macro in
relative and absolute mode, but the mixing of the elements
didn't work. Does anyone know how to edit the macro to do
what I want? For my use, I need to get to the cell as
quickly as possible, that's why I'm writing this macro.
Thank you very much,
Hugh Millen
 
Hi Hugh,

I think you want something like this...

Range("J" & ActiveCell.Row).Offset(1, 0).Select

Regards, Rocky McKinley
 
how about

Activecell.offset(1,0).select
' moves down one row
Range("J" & Activecell.row).select
' select col J in the active row.
 
use the following to move DOWN one row and RIGHT 5 columns
from the ast active cell:

ActiveCell.Offset(rowOffset:=1, columnOffset:=5).Select

use the following to move UP one row and LEFT 5 columns
from the ast active cell:

ActiveCell.Offset(rowOffset:=-1, columnOffset:=-5).Select
 
Back
Top