Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo Fin
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, [I4]) Is Nothing Then
Application.ScreenUpdating = False
For Ligne = Range("B65500").End(xlUp).Row To 5 Step -1
If Cells(Ligne, "F") <> 8 And Cells(Ligne, "F") <> 12 Then Rows(Ligne).Delete Shift:=xlUp
Next Ligne
DL = Range("B65500").End(xlUp).Row
ActiveSheet.Sort.SortFields.Clear
ActiveSheet.Sort.SortFields.Add Key:=Range("C5:C" & DL), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveSheet.Sort
.SetRange Range("B4:I" & DL)
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End If
Fin:
End Sub