Sub macro_de_tri()
Dim pl As Range
Set pl = Range("A5:T" & [A65000].End(xlUp).Row)
pl.Name = "base"
For Each sh In Sheets
If sh.Name <> "Feuil1" And sh.Name <> "tri D O" And sh.Name <> "trie" And sh.Name <> "Feuil1 (2)" And sh.Name <> "do avec investigations" Then
If sh.Name <> "sans type" Then
With sh
.[V1] = "type mission"
.[V2] = sh.Name
Range("base").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=.[V1:V2], CopyToRange:=.Range("A5:T5"), Unique:=False
.[V1:V2].ClearContents
End With
Else
With sh
.[V1] = "type mission"
.[V2] = ""
Range("base").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=.[V1:V2], CopyToRange:=.Range("A5:T5"), Unique:=False
.[V1:V2].ClearContents
End With
End If
End If
Next sh
End Sub