Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have two arrays that I'd like to assign to a different 2 dimensional array. For example, array1 is one dimensional and so is array2. These arrays are returned to me via different sub procedures. I'd like to assign the array values of array1 and array2 to a new array named array3 which is 2 dim i.e. has rows and cols. I know the following wouldn't work i.e. need a loop or something...any pointers will be appreciated. array3(r, 1) = array1 array3(r, c) = array2 Thanks for help. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Look at this example: Sub bbb() Dim MyArray1(10) Dim MyArray2(10) Dim MyArray3 ReDim MyArray3(UBound(MyArray1), 2) For r = LBound(MyArray3, 1) To UBound(MyArray3, 1) MyArray3(r, 1) = MyArray1(r) MyArray3(r, 2) = MyArray2(r) Next End Sub Regards, Per "Varun" skrev i meddelelsen ... Hi, I have two arrays that I'd like to assign to a different 2 dimensional array. For example, array1 is one dimensional and so is array2. These arrays are returned to me via different sub procedures. I'd like to assign the array values of array1 and array2 to a new array named array3 which is 2 dim i.e. has rows and cols. I know the following wouldn't work i.e. need a loop or something...any pointers will be appreciated. array3(r, 1) = array1 array3(r, c) = array2 Thanks for help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional assignment? | Excel Programming | |||
Formulas assignment from array to range in VSTO Excel doesn't work | Excel Worksheet Functions | |||
Key Assignment Log | Excel Discussion (Misc queries) | |||
Assignment problem | Excel Programming |