How can I optimize this loop?:
VB Code:
For I = 0 To UBound(hk) - 1 For D = 0 To UBound(sono) - 1 If InStr(1, Trim(sono(D)), Trim(hk(I))) > 0 Then sAll = sAll & vbCrLf & Trim(hk(I)) & " ***PASSER***" GoTo NextLoop End If Next sAll = sAll & vbCrLf & Trim(hk(I)) & " ***PASSER IKKE***" NextLoop: Next
What I need to do is see if any of the values in 'hk' are similar to any of the values in 'sono'.
A friend told me of something called binary sorting - if this is a possibility, how would I do it?
Cheers!




Reply With Quote