Push cells down in Excel.

I am looking for a way in excel to push all the cells from D to K by one. Any ideas?
Who is Participating?
If you want to move a range, you can just select a cell with Cells(x,y), you need to select a range.
Select the range and click on the edge of the selected area and drag and drop to the position you want...
Blowfelt82Author Commented:
Sorry, my fault... I meant to do this in VBA script
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Something like this:

Selection.Cut Destination:=Range("D2")
Blowfelt82Author Commented:
Ok, I am using the line Cells(i, 1).Select, so will not necessarily know the column letter, is there a way I can do this from the selected cell row?
Elton PascuaCommented:
Not sure by what you mean to "push down" when you want to move values across.

The procedure below moves all your cells in column D to column K. All columns from D and K will all move to the right. Not sure if this is what you wanted.

Sub MoveToK()

    Dim ws As Worksheet
    Set ws = ThisWorkbook.Worksheets("Sheet1")
    Dim lr As Long
    Dim moveRange As Range
    Dim i As Integer
    lr = ws.UsedRange.Rows.Count
    Set moveRange = ws.Range("D1:D" & lr)
    For i = 1 To 7
        moveRange.Insert Shift:=xlToRight
    Next i
End Sub

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.