lastrow = Range("A65536").End(xlUp).Row
Cells(lastrow + 1, 1).Select
Selection.End(xlDown).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlFormulas, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Replace What:="TYPE", Replacement:=Repere, LookAt:=xlPart" _
, SearchOrder:=xlByRows, MatchCase:=False
Range("A18:V18").Select
Selection.EntireRow.Hidden = True
Range("A19:V40").Select
Selection.Sort Key1:=Range("A19"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A1").Select