I am trying to take a two dimensional array stored in a Variant and have it flow across a union. For instance:
Dim data As Variant
Set data = GetData() ' v is now a 10x2 array of data.
Union(Range("A1:A10"), Range("C1:C10")) = data
In this simple example, the first column of data will appear in the range A1:A10. However, the first column of data will also appears in the range C1:C10; in other words Excel starts at the beginning of the data variable every time it gets to a new range in the union. What I really want is for A1:A10 to contain the first column of data and C1:C10 to contain the second column of data.
Thanks.
Abiel
Dim data As Variant
Set data = GetData() ' v is now a 10x2 array of data.
Union(Range("A1:A10"), Range("C1:C10")) = data
In this simple example, the first column of data will appear in the range A1:A10. However, the first column of data will also appears in the range C1:C10; in other words Excel starts at the beginning of the data variable every time it gets to a new range in the union. What I really want is for A1:A10 to contain the first column of data and C1:C10 to contain the second column of data.
Thanks.
Abiel