Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 | | | | | | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
COUNTIFS equivalent in Excel 2003 - both criteria have text, one has "wildcard" | Excel Worksheet Functions | |||
Excel Equivalent of Access "Load" Event? | Excel Discussion (Misc queries) | |||
Is there an Excel 2003 equivalent to Word's "versions" function? | Excel Discussion (Misc queries) | |||
Is there an equivalent of Lotus 123's "Paste visible" command? | Excel Discussion (Misc queries) | |||
Is there a "replace" or "Substitute" command in Excel's VB? | Excel Programming |