ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   What would be Excel's equivalent for a Lotus line "[Input].MoveCellPointer $Right,1"? (https://www.excelbanter.com/excel-programming/340316-what-would-excels-equivalent-lotus-line-%5Binput%5D-movecellpointer-%24right-1-a.html)

Spamfighter

What would be Excel's equivalent for a Lotus line "[Input].MoveCellPointer $Right,1"?
 
Recording a macro in Excel after

Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select

to move past a column (BE), I end up at the last column with data
I move the curser to the next column on the right I get

Range("T5").Select

i.e. an absolute location. That is not what I need as after entering data
into this column, the next time I execute the macro I like to end up at "U5"
etc.

Testing the recording of the same macro in Lotus I end up after

[Input].MoveCellPointer $EndLeft,1
[Input].MoveCellPointer $EndLeft,1

and moving the curser to the nect column on the right I get

[Input].MoveCellPointer $Right,1

Thus in Lotus it works fine as I always end up at the correct column

Anyone knows the equivalent Excel macro line which doesn't move me to an
absolute location but just the next column to the right?

Thanks, Willi






Jim Thomlinson[_4_]

What would be Excel's equivalent for a Lotus line "[Input].MoveCel
 
Since you are moving the active cell you probably want

activecell.offset(0, 1).select

--
HTH...

Jim Thomlinson


"Spamfighter" wrote:

Recording a macro in Excel after

Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select

to move past a column (BE), I end up at the last column with data
I move the curser to the next column on the right I get

Range("T5").Select

i.e. an absolute location. That is not what I need as after entering data
into this column, the next time I execute the macro I like to end up at "U5"
etc.

Testing the recording of the same macro in Lotus I end up after

[Input].MoveCellPointer $EndLeft,1
[Input].MoveCellPointer $EndLeft,1

and moving the curser to the nect column on the right I get

[Input].MoveCellPointer $Right,1

Thus in Lotus it works fine as I always end up at the correct column

Anyone knows the equivalent Excel macro line which doesn't move me to an
absolute location but just the next column to the right?

Thanks, Willi







Spamfighter

What would be Excel's equivalent for a Lotus line "[Input].MoveCel
 
Thanks Jim, that does the trick

Willi

"Jim Thomlinson" wrote in message
...
| Since you are moving the active cell you probably want
|
| activecell.offset(0, 1).select
|
| --
| HTH...
|
| Jim Thomlinson
|
|
| "Spamfighter" wrote:
|
| Recording a macro in Excel after
|
| Selection.End(xlToLeft).Select
| Selection.End(xlToLeft).Select
|
| to move past a column (BE), I end up at the last column with data
| I move the curser to the next column on the right I get
|
| Range("T5").Select
|
| i.e. an absolute location. That is not what I need as after entering
data
| into this column, the next time I execute the macro I like to end up at
"U5"
| etc.
|
| Testing the recording of the same macro in Lotus I end up after
|
| [Input].MoveCellPointer $EndLeft,1
| [Input].MoveCellPointer $EndLeft,1
|
| and moving the curser to the nect column on the right I get
|
| [Input].MoveCellPointer $Right,1
|
| Thus in Lotus it works fine as I always end up at the correct column
|
| Anyone knows the equivalent Excel macro line which doesn't move me to an
| absolute location but just the next column to the right?
|
| Thanks, Willi
|
|
|
|
|
|




All times are GMT +1. The time now is 05:29 PM.

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