BombSheels
New Member
- Joined
- Apr 16, 2021
- Messages
- 15
- Office Version
- 365
- Platform
- Windows
Hello Experts,
I've been trying to modify this macro i've found in the forum.
In my source file, i need to copy data from Column BH-BK and paste the data in another sheet vertically, to be paste in column BK.
i have more than 200 rows to be copied
Here's my code:
Sub Sin3()
Dim Ary As Variant, Nary As Variant
Dim r As Long, nr As Long
Ary = Sheets("COPY DATA").Range("BH3").CurrentRegion.Value2
ReDim Nary(1 To UBound(Ary) * (UBound(Ary, 2) + 1), 1 To 1)
For r = 3 To UBound(Ary)
nr = nr + 1
Nary(nr, 1) = Ary(r, 1): Nary(nr + 1, 1) = Ary(r, 2): Nary(nr + 2, 1) = Ary(r, 3): Nary(nr + 3, 1) = Ary(r, 4)
nr = nr + 3
Next r
Sheets("PENETRATE").Range("BK8").Resize(nr).Value = Nary
End Sub
COPY DATA SHEET
PENETRATE SHEET
I've been trying to modify this macro i've found in the forum.
In my source file, i need to copy data from Column BH-BK and paste the data in another sheet vertically, to be paste in column BK.
i have more than 200 rows to be copied
Here's my code:
Sub Sin3()
Dim Ary As Variant, Nary As Variant
Dim r As Long, nr As Long
Ary = Sheets("COPY DATA").Range("BH3").CurrentRegion.Value2
ReDim Nary(1 To UBound(Ary) * (UBound(Ary, 2) + 1), 1 To 1)
For r = 3 To UBound(Ary)
nr = nr + 1
Nary(nr, 1) = Ary(r, 1): Nary(nr + 1, 1) = Ary(r, 2): Nary(nr + 2, 1) = Ary(r, 3): Nary(nr + 3, 1) = Ary(r, 4)
nr = nr + 3
Next r
Sheets("PENETRATE").Range("BK8").Resize(nr).Value = Nary
End Sub
COPY DATA SHEET
PENETRATE SHEET