View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban Alan Beban is offline
external usenet poster
 
Posts: 200
Default Append One Array to Another, and Consolidate

Stratuser wrote:
The duplicate elements I was referring to would occur in the first column.
If there were two elements in the first column with the same value (ticker
symbols in my case) as a result of appending the two arrays, I would
substitute any positive values in the columns to the right for blank or zero
values for the same ticker symbol. To illustrate, here's an example of two
arrays, 2x5 and 3x5:

array1:

A Tech 0 5 9
B Energy 0 6 4

array 2:

A Tech 4 0 9
K Materials 6 0 8
L Utilities 7 0 3

The two arrays would consolidate like so, because ticker A is in both arrays:

A Tech 4 5 9
B Energy 0 6 4
K Materials 6 0 8
L Utilities 7 0 3

I'm still not quite getting the algorithm. Suppose everything were as
above except that the first row of array1 were

A Tech 3 5 7

what would be the value for resultingArray(1,3) and resultingArray(1,5)?

Alan Beban