Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"