DataBlake
Well-known Member
- Joined
- Jan 26, 2015
- Messages
- 781
- Office Version
- 2016
- Platform
- Windows
Code:
Sub aanewWPcode()
Dim ary As Variant
Dim i As Long
With ActiveSheet
ary = .Range("A1").CurrentRegion.Value2
End With
End Sub
So i have this macro that will assign an entire sheet as an array
I'm trying to copy the entire 2nd column to the 1st column so
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Blank
[/TD]
[TD]Part Number
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]123
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]456
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]789
[/TD]
[/TR]
</tbody>[/TABLE]
becomes
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Blank
[/TD]
[TD]Part Number
[/TD]
[/TR]
[TR]
[TD]123
[/TD]
[TD]123
[/TD]
[/TR]
[TR]
[TD]456
[/TD]
[TD]456
[/TD]
[/TR]
[TR]
[TD]789
[/TD]
[TD]789
[/TD]
[/TR]
</tbody>[/TABLE]
i don't want to use i = 2 to ubound
i want to write this using the range.value = ary method, but i'm not sure how to write that line.