Sub Masque_Repondeur()
Dim P As Range, tablo, i&, s, j%, x$
With Feuil1 'CodeName
If .FilterMode Then .ShowAllData 'si la feuille est filtrée
Set P = .Range("G4", .Range("G" & .Rows.Count).End(xlUp))
End With
If P.Row < 4 Then Exit Sub 'sécurité
tablo = P.Resize(, 2) 'matrice, plus rapide, au moins 2 éléments
Application.ScreenUpdating = False
P.EntireRow.Hidden = True 'masque tout
For i = 1 To UBound(tablo)
s = Split(tablo(i, 1), vbLf)
For j = 0 To UBound(s)
x = Replace(s(j), " ", "")
If x <> "" Then If Not x Like "##-##-####:##:Répondeur-" Then P.Rows(i).Hidden = False: Exit For
Next j, i
End Sub
Sub Affiche_Repondeur()
Dim P As Range, tablo, i&, s, j%, x$
With Feuil1 'CodeName
If .FilterMode Then .ShowAllData 'si la feuille est filtrée
Set P = .Range("G4:H" & .Range("G" & .Rows.Count).End(xlUp).Row) '2 colonnes
End With
If P.Row < 4 Then Exit Sub 'sécurité
Application.ScreenUpdating = False
P.EntireRow.Hidden = False 'affiche tout
P.Columns(2) = "=(LEN(G4)-LEN(SUBSTITUTE(G4,""Répondeur"",)))/9" 'compte le mot
P.Columns(2) = P.Columns(2).Value 'supprime les formules
P.Sort P(1, 2), xlDescending, Header:=xlNo 'tri décroissant
P.Columns(2) = "" 'RAZ
P.Rows.AutoFit 'ajuste la hauteurs des lignes
tablo = P 'matrice, plus rapides
For i = 1 To UBound(tablo)
s = Split(tablo(i, 1), vbLf)
For j = 0 To UBound(s)
x = Replace(s(j), " ", "")
If x <> "" Then If Not x Like "##-##-####:##:Répondeur-" Then P.Rows(i).Hidden = True: Exit For
Next j, i
End Sub
Sub Affiche_tout()
With Feuil1 'CodeName
.Rows("4:" & .Rows.Count).Hidden = False
End With
End Sub