Hi,
I ask for suggestions to change the code in an efficient way by using arrays ...
I have two columns of unique values and sorted in ascending order
A
112
144
156
184
222
D
111
144
156
188
E=
144
156
Your assistance in this regard is most appreciatedCode:Sub CercaeTrova() Dim Righetot As Integer Dim Riga As Integer Dim Riga1 As Integer Dim RigaCodice As Integer With ActiveSheet RigaCodice = 1 Righetot = .[A1].End(xlDown).Row For Riga = 1 To Righetot For Riga1 = 1 To Righetot If .Cells(Riga1, 4).Value = .Cells(Riga, 1).Value Then .Cells(RigaCodice, 5).Value = .Cells(Riga, 1).Value RigaCodice = RigaCodice + 1 End If Next Next End With End Sub




Reply With Quote
Bookmarks