LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default A hard one for manipulating arrays

Code reuse. Your procedure combines two arrays. You want to combine arrays
A, B, C, D, E. Use your procedure to bind A and B, then reuse it to combine
[AB] and C, [ABC] and D, and finally [ABCD] and E.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Albert" wrote in message
...
Hello and Happy New Year...
I recently created a nice little procedure that "bonds" two arrays
toghether
(see below). I now want to make a procedure that bonds a variable number
of
arrays (they are all two dimentional and all have the same horizontal
Ubound). For example, sometimes I have to bond only 2 arrays, but
sometimes I
may have to bond 5 of them toghether. I haven't been able to figure it
out.
Perhaps someone has done something similar or has some ideas?
Thanks in advance,
Albert C

Public RegistrosExistentes() As Variant
Public Const TotalFields = 13
Sub ConstruirArrayRegistrosExistentes(Arr1, Arr2)
ReDim RegistrosExistentes(1 To (UBound(Arr1, 1) + UBound(Arr2, 1)), 1 To
TotalFields)

For x = 1 To UBound(Arr1, 1)
For Y = 1 To TotalFields
RegistrosExistentes(x, Y) = Arr1(x, Y)
Next Y
Next x
For x = 1 To UBound(Arr2, 1)
For Y = 1 To TotalFields
RegistrosExistentes(UBound(Arr1, 1) + x, Y) = Arr2(x, Y)
Next Y
Next x
End Sub



 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Manipulating Arrays Alan Beban[_2_] Excel Worksheet Functions 0 November 8th 07 08:10 PM
Functions for manipulating arrays Alan Beban[_2_] Excel Discussion (Misc queries) 0 September 24th 07 07:05 AM
Functions for manipulating arrays Alan Beban[_2_] Excel Worksheet Functions 0 September 24th 07 07:04 AM
Arrays - declaration, adding values to arrays and calculation Maxi[_2_] Excel Programming 1 August 17th 06 04:13 PM
Arrays Take too long. VERY HARD QUESTION. my head hurts : / belly0fdesire Excel Worksheet Functions 1 August 6th 05 12:47 AM


All times are GMT +1. The time now is 06:51 AM.

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"