Is there a way to move a selected range to the next row?

Let's say I have "E9:H9" selected and want the selection to move to "E10:H10". Is there a shortcut for it? The selection should not be extended but moved one row down.

link|improve this question

69% accept rate
I suppose you want to retain the data? – Sathya Oct 4 '11 at 9:28
1  
Simple Cut & Paste will work for you, select your data, click "Ctrl+X", now click on cell address E10:H10 and press "Ctrl+V" , it's done... – V413HAV Oct 4 '11 at 9:41
Hi. That's not what I had in mind. But I solved it using a macro. Thx anyway. – user48604 Oct 4 '11 at 9:54
@user48604 please post the macro as an answer. – Sathya Oct 4 '11 at 10:08
I note all the solutions (including self solution) - are macros. This question belongs on stack overflow not super user – brettdj Dec 1 '11 at 2:10
feedback

3 Answers

up vote 3 down vote accepted

It sounds like you just need something like this:

Sub moveselection()

Selection.Offset(1, 0).Select

End Sub

This will move your selection one row down without changing the size of the selection.

link|improve this answer
feedback

(a) That code doesn't move down one row as per question

(b) It will work on only the first row of a selection, did you want it to work on a multiple row selection ?

(c) Rather than call a sub for this you could run it automatically by right clicking your mouse - you can do this by adding right clicking your sheet tab, View Code, and pasting in the code below

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
    On Error Resume Next
    Range("E" & CStr(Selection.Row) & ":" & "GN" & CStr(Selection.Row)).Select
End Sub
link|improve this answer
feedback

Ok,

The cursor has to be in the row and the ranges "E" and "GN" need adjustement for different columns but it saves me some time:

Sub SelectRange()

  Dim RowNumber As Integer

  RowNumber = Selection.Row
  Range("E" & CStr(RowNumber) & ":" & "GN" & CStr(RowNumber)).Select

End Sub
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.