I have a table range contains data from ColA to colG, i want to select some col inside the range and union them together to put into a array, i use below codes, but it seems vArray turns out to be contain only one col (ColA) data only, how can i change the code so that it will contain col 1, 4, 6, 7? Thanks
Code:
Sub test()
Call EquityCSV(Range("A4:G80"))
End Sub
Sub EquityCSV(rEquityRange As Range)
Dim rRange As Range
Set rRange = Application.Union(rEquityRange.Columns(1), rEquityRange.Columns(4), _
rEquityRange.Columns(6), rEquityRange.Columns(7))
rRange.Select
Dim vArray As Variant
vArray = rRange.Value
End Sub