King_leopard
New Member
- Joined
- Oct 7, 2014
- Messages
- 3
I'm trying to create a macro to cut a row with multiple columns and paste it one row above. Next I copy values from this recently pasted row (columns A-G only) and paste it in a blank row which was created from the above action.
This code works for only one row but I need to highlight different rows and paste them in the same manner. My Question is how do I have the row selection criteria to change with whatever I'm selecting so it can be cut and paste as mentioned below but just the rows I'm selecting?
Rows("1530:1530").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("1531:1531").Select
Selection.Cut
Rows("1530:1530").Select
ActiveSheet.Paste
Range("A1530:G1530").Select
Selection.Copy
Range("A1531").Select
ActiveSheet.Paste
End Sub
Thank you,
This code works for only one row but I need to highlight different rows and paste them in the same manner. My Question is how do I have the row selection criteria to change with whatever I'm selecting so it can be cut and paste as mentioned below but just the rows I'm selecting?
Rows("1530:1530").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("1531:1531").Select
Selection.Cut
Rows("1530:1530").Select
ActiveSheet.Paste
Range("A1530:G1530").Select
Selection.Copy
Range("A1531").Select
ActiveSheet.Paste
End Sub
Thank you,