Merci pour ta réponse mais quand je je lance la macro j'ai toujours l'error 429Option Explicit
Sub Filtre()
Dim J As Long, Nblg As Long
Dim Mondico As Object, DicoKey
Dim Ws As Worksheet
Application.ScreenUpdating = False
Set Ws = ActiveSheet
If Ws.FilterMode = True Then Ws.ShowAllData
Nblg = Range("F" & Rows.Count).End(xlUp).Row
Set Mondico = CreateObject("Scripting.dictionary") (cette ligne est en jaune )
For J = 3 To Nblg
Mondico(Range("F" & J).Value) = ""
Next J
Range("K1") = Range("F2")
For Each DicoKey In Mondico.keys
Ws.Range("K2") = DicoKey
If FeuilleExiste(CStr(DicoKey)) = False Then
Sheets.Add(after:=Sheets(Sheets.Count)).Name = DicoKey
End If
With Sheets(DicoKey)
.Cells.Clear
Ws.Range("A2:I" & Nblg).AdvancedFilter Action:=xlFilterCopy, criteriarange:=Ws.Range("K1:K2"), copytorange:=.Range("A1:I1")
End With
Next DicoKey
With Ws
.Range("K1:K2").ClearContents
.Select
End With
End Sub
Function FeuilleExiste(Nom As String) As Boolean
On Error Resume Next
FeuilleExiste = Sheets(Nom).Name <> ""
On Error GoTo 0
End Function