Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Append One Array to Another, and Consolidate


Stratuser wrote:
Yes, but there is one other thing: My arrays are two-dimensional, based on a
row and column structure, like a range. If I use ReDim Preserve to increase
the big array to add the non-duplicate elements, I can only increase the last
dimension of the array. Since I'm adding rows in effect, I guess I would
need the array structure to be Array(column, row) instead of Array(row,
column). Right?


dunno :)

What kind of values have you got in the inner array? could you
consolidate them to a string using Join method - for the time of
comparation, and array redimensioning, and then do a loop throughout
the array to split them back? It's just a loose idea, as I'd prefere to
see the example itself

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Append One Array to Another, and Consolidate

The values are both strings (ticker symbols) and numbers associated with the
tickers. They are pulled from columns on a worksheet.

"Morris" wrote:


Stratuser wrote:
Yes, but there is one other thing: My arrays are two-dimensional, based on a
row and column structure, like a range. If I use ReDim Preserve to increase
the big array to add the non-duplicate elements, I can only increase the last
dimension of the array. Since I'm adding rows in effect, I guess I would
need the array structure to be Array(column, row) instead of Array(row,
column). Right?


dunno :)

What kind of values have you got in the inner array? could you
consolidate them to a string using Join method - for the time of
comparation, and array redimensioning, and then do a loop throughout
the array to split them back? It's just a loose idea, as I'd prefere to
see the example itself


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Append One Array to Another, and Consolidate

Could you start off with all the data in a single array ?
Then you do not have to combine them later.

Dim var As Variant

var = Union(Range("A1:B4"), Range("A5:B8"))

NickHK

"Stratuser" ...
The values are both strings (ticker symbols) and numbers associated with
the
tickers. They are pulled from columns on a worksheet.

"Morris" wrote:


Stratuser wrote:
Yes, but there is one other thing: My arrays are two-dimensional,
based on a
row and column structure, like a range. If I use ReDim Preserve to
increase
the big array to add the non-duplicate elements, I can only increase
the last
dimension of the array. Since I'm adding rows in effect, I guess I
would
need the array structure to be Array(column, row) instead of Array(row,
column). Right?


dunno :)

What kind of values have you got in the inner array? could you
consolidate them to a string using Join method - for the time of
comparation, and array redimensioning, and then do a loop throughout
the array to split them back? It's just a loose idea, as I'd prefere to
see the example itself




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Append One Array to Another, and Consolidate

Unfortunately, I can't start off with them in a single array, because it
takes one complex operation to get the data for the first array, and then
another operation to get the data for the second array. I was trying to get
all the data into one array to keep from having to do endless lookups between
the two arrays later in the process.

I was hoping to combine the arrays, but it looks like maybe I should look
into whether I can just do the work with two separate arrays -- or go back to
doing things on a worksheet, which is my old method (it does work, but it
isn't as clever as using arrays).

"NickHK" wrote:

Could you start off with all the data in a single array ?
Then you do not have to combine them later.

Dim var As Variant

var = Union(Range("A1:B4"), Range("A5:B8"))

NickHK

"Stratuser" ...
The values are both strings (ticker symbols) and numbers associated with
the
tickers. They are pulled from columns on a worksheet.

"Morris" wrote:


Stratuser wrote:
Yes, but there is one other thing: My arrays are two-dimensional,
based on a
row and column structure, like a range. If I use ReDim Preserve to
increase
the big array to add the non-duplicate elements, I can only increase
the last
dimension of the array. Since I'm adding rows in effect, I guess I
would
need the array structure to be Array(column, row) instead of Array(row,
column). Right?

dunno :)

What kind of values have you got in the inner array? could you
consolidate them to a string using Join method - for the time of
comparation, and array redimensioning, and then do a loop throughout
the array to split them back? It's just a loose idea, as I'd prefere to
see the example itself





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
Trying to append to file using an array Susan Hayes Excel Programming 1 January 5th 06 08:55 AM
Append data from a column to separate table array miss_q Excel Programming 5 December 12th 05 11:01 PM
Consolidate data in an 2-dimension array in VBA Huyeote[_15_] Excel Programming 0 October 18th 05 01:31 AM
how to know which row to append for the last row tango Excel Programming 2 October 16th 04 02:23 PM
Qn: How to Append??? Michael Vaughan Excel Programming 1 September 19th 04 05:32 PM


All times are GMT +1. The time now is 09:23 AM.

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

About Us

"It's about Microsoft Excel"