Lig = Sheets(2).Range("A" & Rows.Count).End(xlUp).Row
Der = Sheets(1).Range("A" & Rows.Count).End(xlUp).Row
'on copie toutes les données dans un tableau
Montab=Sheets(1).Range("A1:B" & Der)
Montab1=Sheets(2).Range("A1:B" & Lig)
For i = 1 To Der ' ou for i= lbound(Montab) to Ubound(Montab)
For j = 1 To Lig ' ou for j= lbound(Montab1) to Ubound(Montab1)
If Montab(i, 1) = Montab1(j, 1) Then Montab(i, 2)=Montab1(j, 2)
Next j
Next i
' après le travail en mémoire on copie le résultat sur la feuille
Sheets(1).range("A1").resize(ubound(Montab,1),ubound(Montab,2))=Montab