Hello All,
In got a problem with the code below. It must be much faster. I got my primary array with numbers (100000 rows). After that I got a multi dim array that includes part of the numbers from the primary array in the first column. I would like to make the the multi dim array to have the same numbers of rows and the numbers to align with the primary array.
The code below works for one column but is to slow
For j = LBound(v, 1) To 1000 UBound(v, 2)
Pos = Application.Match(v(0, j), ArrayWithNumbers, False)
If Not IsError(Pos) Then
v3(0, Pos) = v(0, j)
Else
End If
Next j
Example:
Primary array Multidim array (before) Multidim array (after)
1 2 aa
2 5 ff 2 aa
3 6 jj
4
5 5 ff
6 6 jj
Please help!
In got a problem with the code below. It must be much faster. I got my primary array with numbers (100000 rows). After that I got a multi dim array that includes part of the numbers from the primary array in the first column. I would like to make the the multi dim array to have the same numbers of rows and the numbers to align with the primary array.
The code below works for one column but is to slow
For j = LBound(v, 1) To 1000 UBound(v, 2)
Pos = Application.Match(v(0, j), ArrayWithNumbers, False)
If Not IsError(Pos) Then
v3(0, Pos) = v(0, j)
Else
End If
Next j
Example:
Primary array Multidim array (before) Multidim array (after)
1 2 aa
2 5 ff 2 aa
3 6 jj
4
5 5 ff
6 6 jj
Please help!