Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
move cursor in excle using macro
ok, sounds dumb, but how do I move the cursor in excel a set number of lines
using a macro - cant use a cell reference because it changes all the time. I need to cut an item in 1 cell, move down 2 lines, past it and then "enddown" to find the next instance. I have 100's of these to do, and number of lines between each cut/paste is never the same. I know its really simple, but just cant seem to get it working...help please!!!! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
move cursor in excle using macro
hi
activecell.cut destination:=activecell.offset(2,0) activecell.end(xldown).activate but if the number of rows between the cut and paste is never the same, i can't see how this will do much good other than show you the syntax. Regards FSt1 "fdibbins" wrote: ok, sounds dumb, but how do I move the cursor in excel a set number of lines using a macro - cant use a cell reference because it changes all the time. I need to cut an item in 1 cell, move down 2 lines, past it and then "enddown" to find the next instance. I have 100's of these to do, and number of lines between each cut/paste is never the same. I know its really simple, but just cant seem to get it working...help please!!!! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
move cursor in excle using macro
Thanks a bunch, works great. The cut/paste distance remains the same, just
the distance to the next "set" changes, so an .end(xldown) works well for that too. If i wanted to just move to a cell x lines down (or x colums across), what part of this command would do that? ActiveCell.Cut Destination:=ActiveCell.Offset(1, 0) ActiveCell.End(xlDown).Activate and thanks for the really fast reply :) "FSt1" wrote: hi activecell.cut destination:=activecell.offset(2,0) activecell.end(xldown).activate but if the number of rows between the cut and paste is never the same, i can't see how this will do much good other than show you the syntax. Regards FSt1 "fdibbins" wrote: ok, sounds dumb, but how do I move the cursor in excel a set number of lines using a macro - cant use a cell reference because it changes all the time. I need to cut an item in 1 cell, move down 2 lines, past it and then "enddown" to find the next instance. I have 100's of these to do, and number of lines between each cut/paste is never the same. I know its really simple, but just cant seem to get it working...help please!!!! |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
move cursor in excle using macro
hi,
the offset part. offset(x,y) where x = row and y = columns postive x = rows down, negative x = rows up postive y = columns left and negative = columns right read up on it in vb help Regards FS1 "fdibbins" wrote: Thanks a bunch, works great. The cut/paste distance remains the same, just the distance to the next "set" changes, so an .end(xldown) works well for that too. If i wanted to just move to a cell x lines down (or x colums across), what part of this command would do that? ActiveCell.Cut Destination:=ActiveCell.Offset(1, 0) ActiveCell.End(xlDown).Activate and thanks for the really fast reply :) "FSt1" wrote: hi activecell.cut destination:=activecell.offset(2,0) activecell.end(xldown).activate but if the number of rows between the cut and paste is never the same, i can't see how this will do much good other than show you the syntax. Regards FSt1 "fdibbins" wrote: ok, sounds dumb, but how do I move the cursor in excel a set number of lines using a macro - cant use a cell reference because it changes all the time. I need to cut an item in 1 cell, move down 2 lines, past it and then "enddown" to find the next instance. I have 100's of these to do, and number of lines between each cut/paste is never the same. I know its really simple, but just cant seem to get it working...help please!!!! |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
move cursor in excle using macro
again, thanks very much for the speedy and helpful reply. you guys rock!
"FSt1" wrote: hi, the offset part. offset(x,y) where x = row and y = columns postive x = rows down, negative x = rows up postive y = columns left and negative = columns right read up on it in vb help Regards FS1 "fdibbins" wrote: Thanks a bunch, works great. The cut/paste distance remains the same, just the distance to the next "set" changes, so an .end(xldown) works well for that too. If i wanted to just move to a cell x lines down (or x colums across), what part of this command would do that? ActiveCell.Cut Destination:=ActiveCell.Offset(1, 0) ActiveCell.End(xlDown).Activate and thanks for the really fast reply :) "FSt1" wrote: hi activecell.cut destination:=activecell.offset(2,0) activecell.end(xldown).activate but if the number of rows between the cut and paste is never the same, i can't see how this will do much good other than show you the syntax. Regards FSt1 "fdibbins" wrote: ok, sounds dumb, but how do I move the cursor in excel a set number of lines using a macro - cant use a cell reference because it changes all the time. I need to cut an item in 1 cell, move down 2 lines, past it and then "enddown" to find the next instance. I have 100's of these to do, and number of lines between each cut/paste is never the same. I know its really simple, but just cant seem to get it working...help please!!!! |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
move cursor in excle using macro
Post examples of before/after -- Don Guillett Microsoft MVP Excel SalesAid Software "fdibbins" wrote in message ... ok, sounds dumb, but how do I move the cursor in excel a set number of lines using a macro - cant use a cell reference because it changes all the time. I need to cut an item in 1 cell, move down 2 lines, past it and then "enddown" to find the next instance. I have 100's of these to do, and number of lines between each cut/paste is never the same. I know its really simple, but just cant seem to get it working...help please!!!! |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
move cursor in excle using macro
I don't like selections but try this. Change "a" to your column.
Sub cuttworowsdown() cells(Rows.Count, "a").End(xlUp).Select Do Until ActiveCell.Row = 1 ActiveCell.Cut ActiveCell.Offset(2) ActiveCell.End(xlUp).Select Loop End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "fdibbins" wrote in message ... ok, sounds dumb, but how do I move the cursor in excel a set number of lines using a macro - cant use a cell reference because it changes all the time. I need to cut an item in 1 cell, move down 2 lines, past it and then "enddown" to find the next instance. I have 100's of these to do, and number of lines between each cut/paste is never the same. I know its really simple, but just cant seem to get it working...help please!!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to move cursor one cell right | New Users to Excel | |||
move cursor on one sheet moves cursor on all sheets | Excel Discussion (Misc queries) | |||
Visual basic macro move cursor down 1 cell | Excel Worksheet Functions | |||
Move cursor to next row | Excel Discussion (Misc queries) | |||
Move Cursor to A1 | Excel Discussion (Misc queries) |