Macro to move to next cell

  • Thread starter Thread starter Neil
  • Start date Start date
N

Neil

Trying to get a macro to move like I am using the arrow
keys left, right etc. with a number to left or right etc.

Ex. ActiveCell.Activate.toRight = 3

Thanks Neil
 
Neil, will this help

Sub Move_Right()
'this will move 3 cells to the right
ActiveCell.Offset(0, 3).Select
End Sub

Sub Move_Left()
'this will move 3 cells to the left
ActiveCell.Offset(0, -3).Select
End Sub
--
Paul B
Always backup your data before trying something new
Using Excel 2000 & 97
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
 
Neil said:
Trying to get a macro to move like I am using the arrow
keys left, right etc. with a number to left or right etc.

Ex. ActiveCell.Activate.toRight = 3

Thanks Neil

Hi Neil,

try,
activecell.offset(0,1).select

This should move the selected cell one column to the right...
If you want to move it 3 column then use: activecell.offset(0,3).select
where (0,3) is 0 rows, 3 columns
hpoe this helps....

seeya ste
 
Back
Top