Sub MAJ_V2()
'deb = Timer
Dim Tablo2, TabDonnées(1 To 25), i As Long, j As Long, Dico, Clé
Dim Tablo1, Tablo3, W1 As Worksheet, W2 As Worksheet
Set Dico = CreateObject("Scripting.Dictionary")
Set W1 = Worksheets("Feuille1") ' feuille à mettre à jour
Set W2 = Worksheets("Feuille2") ' feuille des données
Tablo2 = W2.Range("A2:Y" & W2.Range("A" & Rows.Count).End(xlUp).Row)
For i = LBound(Tablo2, 1) To UBound(Tablo2, 1)
'Clé = IIf(Len(Tablo2(i, 3)) = 4, "0" & Tablo2(i, 3), Tablo2(i, 3))
Clé = Tablo2(i, 3)
For j = 1 To 25
TabDonnées(j) = Tablo2(i, j) 'Attribution des données
Next
Dico(Clé) = TabDonnées
Next
Tablo1 = W1.Range("C2:C" & W2.Range("A" & Rows.Count).End(xlUp).Row)
ReDim Tablo3(1 To UBound(Tablo1, 1), 1 To 25)
For i = LBound(Tablo1, 1) To UBound(Tablo1, 1)
If Dico.exists(Tablo1(i, 1)) Then
For j = 1 To 25
Tablo3(i, j) = Dico(Tablo1(i, 1))(j)
Next
End If
Next
W1.Range("S2").Resize(UBound(Tablo3), 21) = Tablo3 'mise à jour de Feuille1
'MsgBox "Traitement en : " & Timer - deb
End Sub