View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
fdibbins fdibbins is offline
external usenet poster
 
Posts: 8
Default 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!!!!