Sub M_Test()
Dim Arr, i, j, L, S
Arr = WorksheetFunction.RandArray(10000, 3, -100, 100) 'matrice avec 3 colonnes, valeurs "double" entre -100 et 100
For i = 1 To UBound(Arr)
L = WorksheetFunction.RandBetween(1, 10)
S = ""
For j = 1 To L
S = S & Chr(WorksheetFunction.RandBetween(65, 90))
Next
Arr(i, 3) = S 'remplacer 3ième colonne par un string de longueur variable
Next
With Range("A1").Resize(UBound(Arr), UBound(Arr, 2)) 'plage pour coller
.Value = Arr 'coller matrice originale
.Sort .Range("A1"), xlAscending, .Range("B1"), , xlDescending, .Range("C1"), xlAscending, Header:=xlNo 'puis appliquer un triage oridinaire
'application.sort paramètre 1 = la matrice, paramètre 2 = l'index de a colonne, paramétre 3 = 1 pour ascendant et -1 pour descendant, paramètre 4 eventuellement si on veut trier lignes au lieu de colonnes)
'si on trie plusieurs colonnes, on commence avec le key3, puis le key2 et alors key1
.Offset(, 5) = Application.Sort(Application.Sort(Application.Sort(Arr, 3, 1), 2, -1), 1, 1) 'coller résultat après 3 triage dans la matrice avec le même but
End With
MsgBox Range("J1").Value
End Sub