Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
Sheets("Données ordonnées").Visible = True
Dim Plg As Range
With Sheets("Données ordonnées")
.Parent.Worksheets("Données brutes").Columns("A:M").Copy destination:=.Range("A1")
Set Plg = .Columns("A:M").Resize(.Cells(.Rows.Count, "B").End(xlUp).Row - 1, 13).Offset(1)
With .Sort
With .SortFields
.Clear
.Add Key:=Plg.Cells(1, 2), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
End With
.SetRange Plg
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End With
Application.ScreenUpdating = True
Sheets("Données ordonnées").Visible = False
ActiveWorkbook.Names.Add Name:="Liste", RefersToR1C1:= _
"=OFFSET('Données ordonnées'!R2C2,,,COUNTA('Données ordonnées'!R2C2:R100C2))"
With Range("E2:F2").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=Liste"
End With
End Sub