Option Explicit
Sub Test()
Dim Plage As Range
Dim Lig&
On Error Resume Next
Set Plage = Range("A11:F" & Cells(Rows.Count, 1).End(xlUp).Row)
ActiveSheet.ListObjects.Add(xlSrcRange, Plage, , xlYes).Name = "Tableau1"
With ActiveWorkbook.Worksheets("Feuil1").ListObjects("Tableau1").Sort
.SortFields.Clear
.SortFields.Add Key:=Range("Tableau1[N° produit]")
.SortFields.Add Key:=Range("Tableau1[Date]"), Order:=xlDescending
.Header = xlYes
.Apply
End With
Cells.Rows.Ungroup
For Lig = Range("A" & Rows.Count).End(xlUp).Row To 11 Step -1
If Cells(Lig, 1) = Cells(Lig - 1, 1) Then Rows(Lig).Rows.Group
Next Lig
ActiveSheet.Outline.ShowLevels RowLevels:=1
End Sub