Moving the second row with a macro

M

Max2073

Hi,

I would like to create a macro that moves the second row to the last row in
a range of rows. eg. range - rows 1:100 (I have data in rows 105:5000)

I can not work out if this is possible or how to do it.
 
J

Jacob Skaria

Try the below..

Sub Macro1()
Dim lngLastRow As Long
lngLastRow = Range("A101").End(xlUp).Row

'OR - to move to last+1 row and shift
Rows(2).Cut
Rows(lngLastRow + 1).Insert Shift:=xlDown

'to move to lastRow+1
'Rows(2).Cut Rows(lngLastRow + 1)

End Sub

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top