Copy a range of Rows and paste multiple time to another sheet

BombSheels

New Member
Joined
Apr 16, 2021
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Hello Experts,
I've been trying to figure out how to do this macro. I have a sheet with A-AK in column to be copied multiple times to another sheet.
I have seen and used the code found in this forum as well but with my requirements, I need some modification since the code copies the whole row. And in Column AL- onwards i have different data that doesn't need to be copied. Please help

Here's the code
Sub Copy_Each_Row()
'Modified 5/19/2022 5:28:18 AM EDT
Application.ScreenUpdating = False
Dim i As Long
Dim Lastrow As Long

Lastrow = Cells(Rows.Count, "A").End(xlUp).Row

Dim Lastrowa As Long
Lastrowa = Sheets(3).Cells(Rows.Count, "A").End(xlUp).Row

For i = 3 To Lastrow
Lastrowa = Sheets(3).Cells(Rows.Count, "A").End(xlUp).Row + 1
Sheets(3).Rows(Lastrowa).Resize(4).Value = Sheets(2).Rows(i).Value
Next
Application.ScreenUpdating = True
End Sub

Here's the image: SOURCE FILE
1659061213742.png


should be result
1659061306032.png
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Not tested, but perhaps this:

For i = 3 To Lastrow
Lastrowa = Sheets(3).Cells(Rows.Count, "A").End(xlUp).Row + 1
Sheets(3).Range("A" & Lastrowa & ":AK" & Lastrowa + 3).Value = Sheets(2).Range("A" & i & ":AK" & i).Value
Next
 
Upvote 0
Not tested, but perhaps this:

For i = 3 To Lastrow
Lastrowa = Sheets(3).Cells(Rows.Count, "A").End(xlUp).Row + 1
Sheets(3).Range("A" & Lastrowa & ":AK" & Lastrowa + 3).Value = Sheets(2).Range("A" & i & ":AK" & i).Value
Next
Hello pjoaquin! You rock! Thank you so much! It works perfectly :)
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,139
Members
453,021
Latest member
Justyna P

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