Bonsoir Ayrtonlem, JAMES007, le forum
Ou tout simplement avec une macro de tri :
Option Explicit
Sub test()
Dim x, col As Byte, r As Range
With Sheets("Database pilotes").Range("A1").CurrentRegion
For col = 3 To 7
x = Application.Index(.Value, Evaluate("row(2:" & _
.Rows.Count & ")"), Array(1, 2, col))
mySort x, LBound(x, 1), UBound(x, 1), 3
Set r = Sheets("Records pilotes ").Cells.Find(.Cells(1, col).Value, lookat:=xlWhole)
If Not r Is Nothing Then
r.Offset(1, -2).Resize(10, 3) = x
End If
Next
End With
End Sub
Private Sub mySort(a, LB As Long, UB As Long, ref As Long)
Dim i As Long, ii As Long, iii As Long, temp
For i = LB To UB - 1
For ii = i + 1 To UB
If a(i, ref) < a(ii, ref) Then
For iii = LBound(a, 2) To UBound(a, 2)
temp = a(i, iii): a(i, iii) = a(ii, iii): a(ii, iii) = temp
Next
End If
Next
Next
End Sub
klin89