ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Move the active cell (https://www.excelbanter.com/excel-programming/389090-move-active-cell.html)

Dennis Cheung

Move the active cell
 
Dear Sirs,

Can someone help to write a Macro to move the active cell to my designated
location, not by cell reference. But go to somewhere by direction and
distance.

Example: The active cell is B1, but it is variable. I need the active cell
to go to the next cell in its right hand side, it means C1. Or from C1 to D1,
Or from C3 to C4.

Is it possible? Can someone help?
--
Dennis Cheung

papou

Move the active cell
 
Hello
ActiveCell.Offset(0,1).Select

HTH
Cordially
Pascal

"Dennis Cheung" a écrit dans le
message de news: ...
Dear Sirs,

Can someone help to write a Macro to move the active cell to my designated
location, not by cell reference. But go to somewhere by direction and
distance.

Example: The active cell is B1, but it is variable. I need the active
cell
to go to the next cell in its right hand side, it means C1. Or from C1 to
D1,
Or from C3 to C4.

Is it possible? Can someone help?
--
Dennis Cheung




Norman Jones

Move the active cell
 
Hi Dennis,

If your intention is to select the next cell in the
current row programmatically, Papou has suggested
the required code.

If, however, your intention is to select the next cell in
the current row in response to the Enter key, try:

Menu | Tools | Options | Edit |
Move selection after Enter | Right


---
Regards,
Norman


"Dennis Cheung" wrote in message
...
Dear Sirs,

Can someone help to write a Macro to move the active cell to my designated
location, not by cell reference. But go to somewhere by direction and
distance.

Example: The active cell is B1, but it is variable. I need the active
cell
to go to the next cell in its right hand side, it means C1. Or from C1 to
D1,
Or from C3 to C4.

Is it possible? Can someone help?
--
Dennis Cheung





All times are GMT +1. The time now is 12:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com