ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Comparing to Arrays (https://www.excelbanter.com/excel-programming/308542-re-comparing-arrays.html)

[email protected]

Comparing to Arrays
 
Here's the other task -

I have an array6 that has dimensions as follows - the first dimension
could change, but not the second -

Array6(22526,25)

For each n of Array6(n,25) the Array6(n,1) contains an 18 character
length string that corresponds to the Array5 I describe in the earlier
post. For information, Array6 contains "used" combinations within
Array5.
The challenge is that from time to time, the strings in Array6 may no
longer be contained with Array5 - and are thus now "invalid". So what I
need to do is compare Array5 and Array6 and effectively "tag" each item
in Array6 now as "valid" (e.g. its contained it appears in Array6) or
"invalid" (it doesn't appear in Array6). In both cases Array5 and
Array6 would be sorted based on the corresponding string being compared

- Array6(n,1) and Array5(q,1)

Again though the problem is that Array5 and Array6 are roughly
20-30,000 long each and thus to loop through each would create a need
for something like a little less than 1 billion comparisons.


Alan Beban[_2_]

Comparing to Arrays
 
wrote:

Here's the other task -

I have an array6 that has dimensions as follows - the first dimension
could change, but not the second -

Array6(22526,25)

For each n of Array6(n,25) the Array6(n,1) contains an 18 character
length string that corresponds to the Array5 I describe in the earlier
post. For information, Array6 contains "used" combinations within
Array5.
The challenge is that from time to time, the strings in Array6 may no
longer be contained with Array5 - and are thus now "invalid". So what I
need to do is compare Array5 and Array6 and effectively "tag" each item
in Array6 now as "valid" (e.g. its contained it appears in Array6) or
"invalid" (it doesn't appear in Array6). In both cases Array5 and
Array6 would be sorted based on the corresponding string being compared

- Array6(n,1) and Array5(q,1)

Again though the problem is that Array5 and Array6 are roughly
20-30,000 long each and thus to loop through each would create a need
for something like a little less than 1 billion comparisons.


You still didn't answer: 1. approximately how long does it take? 2.
What version of Excel are you using?

In xl2000 on my machine it takes about 18 secnds if both arrays are 5460
elements. Is that "forever"?

Alan Beban


All times are GMT +1. The time now is 09:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com