Sub TestTri()
Dim der&, N&, last&, t, i&, j&, k&, aux, ech As Boolean
der = Cells(Rows.Count, "c").End(xlUp).Row
If der <= 11 Then Exit Sub
t = Range("a11:t" & 10 + 6 * (1 + Int((der - 11) / 6)))
For i = 1 To UBound(t) - 1 Step 6: t(i, 3) = t(i, 3) & "\" & t(i, 4): Next
Do
ech = False
For i = 1 To UBound(t) - 6 Step 6
If t(i, 3) > t(i + 6, 3) Then
ech = True
For k = 0 To 5
For j = 1 To UBound(t, 2)
aux = t(i + k, j): t(i + k, j) = t(i + k + 6, j): t(i + k + 6, j) = aux
Next j
Next k
End If
Next i
If Not ech Then Exit Do
Loop
For i = 1 To UBound(t) - 1 Step 6: t(i, 3) = Split(t(i, 3), "\")(0): Next
Range("a11").Resize(UBound(t), UBound(t, 2)) = t
End Sub