VBA: Copy 6 rows from Tab2 to a list in Tab1 below each row.

peethulst

New Member
Joined
Jul 3, 2018
Messages
1
How can i copy 6 rows from Tab2 to a list in Tab1 below each row.
Finally i want it to the last record.



Sub CopyPaste11()
Dim i As Long
For i = 1 To 6
'Copies the specified selection to the Clipboard
Sheets("Tab2").Select
Range("A3:U8").Select
Selection.Copy
'Paste the specified selection
Sheets("Tab1").Select
Rows("3:3").Select
Selection.Insert Shift:=xlDown
'Move to the next row and past again
Selection.Offset(7, 0).Select
Selection.Insert Shift:=xlDown '<< This dont work
Next i
'Cancels Cut or Copy mode and removes the moving border
Application.CutCopyMode = False
End Sub
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
How about
Code:
Sub CopyPaste11()
   Dim i As Long
   Dim rng As Range
   
   Set rng = Sheets("tab2").Range("A3:U8")
   Sheets("Tab1").Select
   For i = Range("A" & Rows.Count).End(xlUp).Row To 2 Step -1
      Rows(i).Resize(6).Insert
      rng.Copy Range("A" & i)
   Next i
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,265
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top