Sub Archiver()
If MsgBox("Archiver les données de " & [AE1] & " ?", vbQuestion + vbYesNo) = vbNo Then Exit Sub
Dim ncol%, num&, i As Variant
ncol = Cells(2, Columns.Count).End(xlToLeft).Column
With Sheets("Archives")
num = Val(Replace(Replace([AE1], "'", ""), "Objectif ", ""))
i = Application.Match(num, .Columns(1), 0)
If IsNumeric(i) Then .Rows(i).Resize(3).Delete
.Rows("1:3").Insert 'insère 3 lignes
Rows(1).Resize(3, ncol).Copy .Cells(1, 2) 'copie tout
.Cells(1, 2).Resize(3, ncol) = Rows(1).Resize(3, ncol).Value 'copie les valeurs
.Cells(1).Resize(3) = num 'repère en colonne A
.UsedRange.Sort .Columns(1), xlAscending, Header:=xlNo 'tri sur la colonne A
.Columns.ColumnWidth = 2
.Columns.AutoFit 'ajustement largeurs
.Columns(1).Hidden = True 'masque la colonne A
End With
End Sub