Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 200
Default A hard one for manipulating arrays

If the functions in the freely downloadablefile at
http://home.pacbell.net/beban are available to your workbook,

arr6 = MakeArray(arr1, arr2, arr3, arr4, arr5, 1); arr6 will be a one
dimensional array of all the elements of the five arrays

p = UBound(arr1, 1) + UBound(arr2, 1) + UBound(arr3, 1) _
+ UBound(arr4, 1) + UBound(arr5, 1)
q = UBound(arr1, 2)
arr7 = ArrayReshape(MakeArray(arr1, arr2, arr3, arr4, arr5, 1), p, q)

arr7 will be a two-dimensional arrays of the five arrays "stacked on
top" of one another.

Alan Beban

Albert wrote:
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

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


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
A hard one for manipulating arrays Jon Peltier Excel Programming 4 January 4th 07 11:42 AM
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 02:11 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"