bonjour,
as-tu modifié le code pour ajouter des déclarations de variables ?
si oui voici comment il aurait fallu le faire.
Sub aargh()
Dim ws1 As Object, ws2 As Object, dict As Object
Dim dl2 As Long, dl1 As Long, i As Long, j As Long
Dim tab2, tab1, col 'variant
Dim k As String
Set ws1 = Sheets("tableau1")
Set ws2 = Sheets("tableau2")
dl2 = ws2.Cells(Rows.Count, 3).End(xlUp).Row
tab2 = ws2.Cells(1, 1).Resize(dl2, 36)
Set dict = CreateObject("scripting.dictionary")
dl1 = ws1.Cells(Rows.Count, 3).End(xlUp).Row
tab1 = ws1.Cells(1, 1).Resize(dl1, 36)
For i = LBound(tab1) To UBound(tab1)
dict.Add tab1(i, 3), i
Next i
col = Array(21, 30, 31, 34, 35, 36)
For i = 3 To dl2
If tab2(i, 36) = "B" Then
k = dict(tab2(i, 3))
For j = LBound(col) To UBound(col)
tab2(i, col(j)) = tab1(k, col(j))
Next j
End If
Next i
ws2.Cells(1, 1).Resize(dl2, 36) = tab2
End Sub
Sinon il faudra passer par une solution moins performante. Mais j'attends ta réponse avant de m'y attaquer.