Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help in Excel VBA
I would like to know if there is a simple way to fill an array variable with several independent arrays.
I.E. I have 12 variable arrays and I need to concatenate it into one. Is that possible? Thank you very much. Regards, João Lagarto |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help in Excel VBA
You cannot say Array1 = Array2 + Array3. Rather, you'd have to build Array1
from the elements of the existing arrays. Each vector of Array1 would have to be as large as the largest equivalent vector of the source arrays. For example, if Array2 is 3 by 1 and Array3 is 1 by 4 then Array1 would have to be 3 by 4. That is, if I'm following you. -- Jim Rech Excel MVP |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help in Excel VBA
Not quite...
just want to build an array picking all separated array's. in my situation i have (for instance): v1(2 by 8) v2(2 by 11) v3(2 by 4) v4(2 by 6) ..... v_all(2 by ??) as ?? would be 8+11+4+6+... I can do it with For cylces, but I wandered if there were a simple way of doing it like v_all() = v1() & v2() & v3() & etc... Hope to explained it better, if not, thank you any way for your time. Regards, João Lagarto |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help in Excel VBA
Dim CArray() As Varian
redim carray (ubound (ARRAY1())+ubound(array2())+ ubound(array3())+...-12 For c1 = 0 To UBound(array1()) - CArray(c1) = array1(c1 Next c For c2 = c1 + 1 To c1 + UBound(array2() caray(c2) = array2(c2 - (c1 + 1) Next c For c3 = c2 + 1 To c2 + UBound(array3() CArray(c3) = array3(c3 - (c2 + 1) Next c ... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|