Copy row and insert based on value in column
Closed
smittyxsmith
-
Jan 25, 2022 at 12:43 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Feb 7, 2022 at 12:03 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Feb 7, 2022 at 12:03 PM
Related:
- Copy row and insert based on value in column
- Insert key on keyboard - Guide
- Saints row 2 cheats - Guide
- Insert check mark in word - Guide
- Insert draft watermark in word on all pages - Guide
- How to insert photo in word for resume - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Contributor
Last seen
December 27, 2022
555
Updated on Feb 7, 2022 at 12:04 PM
Updated on Feb 7, 2022 at 12:04 PM
Hi Smittyxsmith,
Here is your macro code:
Best regards,
Trowa
Here is your macro code:
Sub RunMe()
Dim x, y, lRow As Integer
lRow = Range("J" & Rows.Count).End(xlUp).Row
For x = lRow To 1 Step -1
y = Cells(x, "J")
Do
'For the bonus points adjust the column letters A and J to determine the columns to be copied.
With Range(Cells(x, "A"), Cells(x, "J"))
.Copy
.Insert Shift:=xlDown
End With
y = y - 1
Loop Until y = 0
Next x
End Sub
Best regards,
Trowa