Bonjour Minanse,
Voici les informations demandées. Je vous remercie infiniment de tout le temps pris pour m'aider et en finir enfin avec mon fichier. Il est vrai que ce serait plus simple de vous envoyer le fichier, mais je ne peux malheureusement pas en raison des informations sensibles qui s'y trouve. Voici les données du code :
Private Sub Worksheet_Activate()
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
Cells.EntireRow.Hidden = False
If Not Application.Intersect(Target, Range("D2")) Is Nothing Then ' "D2" est la case qui contient la liste déroulant
For i = 6 To Range("A" & Rows.Count).End(xlUp).Row
If Target.Value = "sans filtre" Then 'si le choix de la liste déroulante est "sans filtre"
Cells.EntireRow.Hidden = False 'affichier tout les ligne de la feuille
Exit For 'on sort du code
End If
If Cells(i, 1).Value <> Target.Value Then
Rows(i).EntireRow.Hidden = True
End If
Next i
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
Cells.EntireRow.Hidden = False
If Not Application.Intersect(Target, Range("D2")) Is Nothing Then ' "D2" est la case qui contient la liste déroulant
For i = 6 To Range("A" & Rows.Count).End(xlUp).Row
If Target.Value = "sans filtre" Then 'si le choix de la liste déroulante est "sans filtre"
Cells.EntireRow.Hidden = False 'affichier tout les ligne de la feuille
Exit For 'on sort du code
End If
If Cells(i, 1).Value <> Target.Value Then
Rows(i).EntireRow.Hidden = True
End If
Next i
End If
End Sub