Macro to move to next cell

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
 
P

Paul B

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 **
 
S

ste mac

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top