1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Sub test()
Dim derligne As Long
Dim j As Long
Application.ScreenUpdating = False
With Sheets("feuil1")
tablo = .Range("A2", "I" & .Range("I" & .Rows.Count).End(xlUp).Row)
End With
With Sheets("feuil2")
derligne = .Range("E" & Rows.Count).End(xlUp).Row
For i = LBound(tablo, 1) To UBound(tablo, 1)
For j = 2 To derligne
If .Cells(j, 5) = tablo(i, 5) And .Cells(j, 8) = tablo(i, 8) Then
.Cells(j, 1) = tablo(i, 1)
.Cells(j, 2) = tablo(i, 2)
.Cells(j, 3) = tablo(i, 3)
.Cells(j, 4) = tablo(i, 4)
.Cells(j, 6) = tablo(i, 6)
.Cells(j, 7) = tablo(i, 7)
.Cells(j, 9) = tablo(i, 9)
End If
Next j
Next i
End With
Application.ScreenUpdating = True
End Sub |
Partager