1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Sub Demo()
With Feuil1.Cells(1).CurrentRegion.Rows
ReDim TK$(2 To .Count)
TD = Application.Index(.Offset(1).Resize(.Count - 1), , 5)
For R& = 2 To .Count
TK(R) = Join$(Application.Index(.Columns("A:D").Value, R), "¤")
Next
End With
With Feuil2.Cells(1).CurrentRegion.Rows
ReDim TP$(2 To .Count, 0)
TS = .Columns("G:K").Value
For R = 2 To .Count
V = Application.Match(Join$(Array(TS(R, 1), TS(R, 2), TS(R, 3), TS(R, 5)), "¤"), TK, 0)
If Not IsError(V) Then TP(R, 0) = TD(V, 1)
Next
.Cells(2, 16).Resize(.Count - 1).Value = TP
End With
End Sub |
Partager