Sub test_ok()
Range("C1:H7").Copy
Sheets("Feuil2").[A1].PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("Feuil2").Activate
[A1].CurrentRegion.Sort Key1:=Range("F2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
[A1].CurrentRegion.Subtotal GroupBy:=6, Function:=xlSum, TotalList:=Array(7), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
ActiveSheet.Outline.ShowLevels RowLevels:=2
Range("F9").Columns.AutoFit
Range("F10").Select
End Sub