Sub Trier()
Dim T, T0, L, C, C2
T0 = Timer
T = [A1].CurrentRegion
For L = 2 To UBound(T, 1)
For C = 1 To UBound(T, 2)
For C2 = C To UBound(T, 2)
If T(L, C) > T(L, C2) Then
Buffer = T(L, C): T(L, C) = T(L, C2): T(L, C2) = Buffer
End If
Next C2
Next C
Next L
[G1].Resize(UBound(T, 1), UBound(T, 2)) = T
[M1] = 1000 * (Timer - T0)
End Sub
Sans plus de précision, faites donc un "Trier" sur votre tableau.comment trier par ordre alphabétique toutes les lignes d'un tableau.
Désolé, mais je ne détecte aucun tri alpha.Quelle(s) règle(s) doit on suivre ?
Sub Trier()
Dim T, T0, L, C, C2
T0 = Timer
T = [A1].CurrentRegion
For L = 2 To UBound(T, 1)
For C = 1 To UBound(T, 2)
For C2 = C To UBound(T, 2)
If T(L, C) > T(L, C2) Then
Buffer = T(L, C): T(L, C) = T(L, C2): T(L, C2) = Buffer
End If
Next C2
Next C
Next L
[G1].Resize(UBound(T, 1), UBound(T, 2)) = T
[M1] = 1000 * (Timer - T0)
End Sub
If T(L, C) > T(L, C2) Then
en
If LCase(T(L, C)) > LCase(T(L, C2)) Then