Sub GetCodes()
Dim tNoms, tNoms2, tCodes, idx 'variants
Dim i As Long, j As Long
With Sheets("Feuil1")
tNoms = .Range("A2:B" & .Cells(.Rows.Count, 1).End(xlUp).Row).Value
End With
With Sheets("Feuil2")
With .Range("A1:A" & .Cells(.Rows.Count, 1).End(xlUp).Row)
tNoms2 = .Value
tCodes = .Offset(, 1).Value
End With
End With
For i = 1 To UBound(tNoms)
idx = Application.Match(tNoms(i, 1), tNoms2, 0)
If Not IsError(idx) Then tNoms(i, 2) = tCodes(idx, 1)
Next i
Sheets("Feuil1").Range("A2").Resize(UBound(tNoms), 2).Value = tNoms
End Sub