Sub Trier()
Dim tablo, ncol%, a(), i&, j%
With [A1].CurrentRegion
If .Parent.FilterMode Then .Parent.ShowAllData 'si la feuille est filtrée
tablo = .Value
If Not IsArray(tablo) Then tablo = .Cells(1).Resize(2)
ncol = UBound(tablo, 2)
ReDim a(1 To ncol)
For i = 1 To Ubound(tablo)
For j = 1 To ncol
If tablo(i, j) = "" Then a(j) = "zzz" Else a(j) = tablo(i, j)
Next j
tri a, 1, ncol
For j = 1 To ncol
If a(j) = "zzz" Then tablo(i, j) = "" Else tablo(i, j) = a(j)
Next j
Next i
.Value = tablo
End With
End Sub
Sub tri(a, gauc, droi) ' Quick sort
Dim ref, g, d, temp
ref = a((gauc + droi) \ 2)
g = gauc: d = droi
Do
Do While a(g) < ref: g = g + 1: Loop
Do While ref < a(d): d = d - 1: Loop
If g <= d Then
temp = a(g): a(g) = a(d): a(d) = temp
g = g + 1: d = d - 1
End If
Loop While g <= d
If g < droi Then Call tri(a, g, droi)
If gauc < d Then Call tri(a, gauc, d)
End Sub