Voici le code
ActiveSheet.Unprotect
Rows('12:200').Select
Selection.Sort Key1:=Range('Q12'), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Rows('12:200').Select
Range('A200').Activate
Selection.Subtotal GroupBy:=17, Function:=xlSum, TotalList:=Array(21, 23, 25, 29, 30, 31) _
, Replace:=True, PageBreaks:=False, SummaryBelowData:=False
Range('A10').Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub