yksvohcurteiP
New Member
- Joined
- Jul 28, 2022
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
Hello,
I m kinda lost. Coulnd't find sollution here so posting new one, hoping someone will help.
What I need is to copy data from row number 1 (sheet1) to specific cells in sheet2. Looks like this:
As you can see, sh_1 cells are from row 2. Copy is done, then sheet 2 (sh_2) is going to print itself. Printed. Great.
Now it should go back to sheet1, go one row down, copy and paste to targeted cells. So:
How can I make it to go down? Do not want to use Offset.
I have last row set up like this:
LastRow = sh_1.Cells(sh_1.Rows.Count, "A").End(xlUp).Row
But how do I loop it so it copies, prints, row down, copies, print, until last row?
If there is similar thread, I am sorry, but honestly - I've searched. Maybe I am a dummy and couldn't fit one.
I m kinda lost. Coulnd't find sollution here so posting new one, hoping someone will help.
What I need is to copy data from row number 1 (sheet1) to specific cells in sheet2. Looks like this:
VBA Code:
sh_1.Activate
sh_1.Range("B2").Select
Selection.Copy
sh_2.Activate
sh_2.Range("A1:A3").PasteSpecial
sh_1.Activate
sh_1.Range("H2").Select
Selection.Copy
sh_2.Activate
sh_2.Range("D8:J8").PasteSpecial
sh_1.Activate
sh_1.Range("F2").Select
Selection.Copy
sh_2.Activate
sh_2.Range("B5:C5").PasteSpecial
As you can see, sh_1 cells are from row 2. Copy is done, then sheet 2 (sh_2) is going to print itself. Printed. Great.
Now it should go back to sheet1, go one row down, copy and paste to targeted cells. So:
VBA Code:
sh_1.Activate
sh_1.Range("B3").Select
Selection.Copy
sh_2.Activate
sh_2.Range("A1:A3").PasteSpecial
sh_1.Activate
sh_1.Range("H3").Select
Selection.Copy
sh_2.Activate
sh_2.Range("D8:J8").PasteSpecial
sh_1.Activate
sh_1.Range("F3").Select
Selection.Copy
sh_2.Activate
sh_2.Range("B5:C5").PasteSpecial
How can I make it to go down? Do not want to use Offset.
I have last row set up like this:
LastRow = sh_1.Cells(sh_1.Rows.Count, "A").End(xlUp).Row
But how do I loop it so it copies, prints, row down, copies, print, until last row?
If there is similar thread, I am sorry, but honestly - I've searched. Maybe I am a dummy and couldn't fit one.