moteurV12
XLDnaute Occasionnel
Bonsoir à Toutes et Tous
Je souhaiterai remplacer le code suivant qui compare 2 colonnes lentement
Set rngA = Range(Cells(1, "BM"), Cells(Rows.Count, "BM").End(xlUp))
Set rngB = Range(Cells(1, "R"), Cells(Rows.Count, "R").End(xlUp))
For Each cell In rngA
titi = Range("AJ2").Value ' titi est un compteur
If Not IsError(Application.Match(cell.Value, rngB, 0)) Then
Cells(titi + 1, "F").Value = Cells(cell.Row, "BM").Value
End If
Next
Par un objet Dictionary plus rapide
Je souhaiterai remplacer le code suivant qui compare 2 colonnes lentement
Set rngA = Range(Cells(1, "BM"), Cells(Rows.Count, "BM").End(xlUp))
Set rngB = Range(Cells(1, "R"), Cells(Rows.Count, "R").End(xlUp))
For Each cell In rngA
titi = Range("AJ2").Value ' titi est un compteur
If Not IsError(Application.Match(cell.Value, rngB, 0)) Then
Cells(titi + 1, "F").Value = Cells(cell.Row, "BM").Value
End If
Next
Par un objet Dictionary plus rapide