BombSheels
New Member
- Joined
- Apr 16, 2021
- Messages
- 15
- Office Version
- 365
- Platform
- 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
should be result
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
should be result