Macro Move down and right

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

When I record a macro, it selects a cell rather than
moving down 10 rows and right two columns. How do I
specify it to move rather than to a specific cell?

Thanks
 
Bill

Not really sure what you mean. The only thing I can think is the macro
recorder disregards any selections between a start and end point, even if
you click on each cell.

If this is what you mean I scribbled this code for fun. It shows the
activecell as the start point and moves down 10 rows and across 2.

Post back if this is not what you meant

Sub MoveSelectionCode()
Dim x As Integer
ActiveCell.Value = "Start Point"
For x = 1 To 10
ActiveCell.Offset(1, 0).Select
Selection.Value = x & " Down"
Application.Wait (Now + TimeValue("00:00:02"))
Next x
For x = 1 To 2
ActiveCell.Offset(0, 1).Select
Selection.Value = x & " Across"
Application.Wait (Now + TimeValue("00:00:02"))
Next x
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
Bill,

Bill and Nick have given you the Offset property. Also, you can actually
record relative movements. If you don't have the Stop Recording toolbar on
the screen, get it (View, Toolbars - Stop recording). There's a button that
switches it among relative/absolute selections.
 
Earl

Good spot...I suspect that was what the OP wanted...I had good fun with mine
though!

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
Back
Top