'Tri pour regrouper les TS et les TC
L = Sheets(feuille).Range("A65536").End(xlUp).Row
For i = 3 To L
For j = i + 1 To L
If Cells(i, 1).Value = Cells(j, 1).Value And Cells(i, 2).Value = Cells(j, 2).Value And Cells(i, 3).Value = Cells(j, 3).Value Then
If Cells(i, 4).Value <> "" Then
Num_TS = Cells(i, 4).Value
Num_TC = Cells(j, 6).Value
Else
Num_TC = Cells(i, 6).Value
Num_TS = Cells(j, 4).Value
End If
If Num_TS = Num_TC And Cells(i, 17).Value = Cells(j, 17).Value Then
Rows(j & ":" & j).Select
Selection.Cut
Rows(i & ":" & i).Select
Selection.Insert Shift:=xlDown
End If
End If
Next j
Next i