N
NorTor
Hello
I am trying to build a range based on whether to specific columns in
two arrays are equal or not.
I used to do this with a for ... next and do until loop, but because I
have a huge number of rows and quite a few columns, this ran way to
slowly.
Here is the poor try I did so far....
**************************************
Dim dSett3() As Variant
ReDim dSett3(3 To (cnt1 + 3))
dSett1 = Range("A3:A" & cnt1 + 3).Value
dSett2 = Sheets("Datasett2a").Range("A2:Z" & cnt2 + 2).Value
For i = 3 To (cnt1 + 3)
For j = 1 To 9
If dSett1(i, 1) = dSett2(i, 1) Then
dSett3 = dSett2(i, (9 + j)).Value
End If
Next j
Next i
*************************************
Please help if you can!
Cheers
NorTor
I am trying to build a range based on whether to specific columns in
two arrays are equal or not.
I used to do this with a for ... next and do until loop, but because I
have a huge number of rows and quite a few columns, this ran way to
slowly.
Here is the poor try I did so far....
**************************************
Dim dSett3() As Variant
ReDim dSett3(3 To (cnt1 + 3))
dSett1 = Range("A3:A" & cnt1 + 3).Value
dSett2 = Sheets("Datasett2a").Range("A2:Z" & cnt2 + 2).Value
For i = 3 To (cnt1 + 3)
For j = 1 To 9
If dSett1(i, 1) = dSett2(i, 1) Then
dSett3 = dSett2(i, (9 + j)).Value
End If
Next j
Next i
*************************************
Please help if you can!
Cheers
NorTor