Sub Masquer()
'---pour masquer/afficher les lignes non colorées---
Dim cel As Range, deb&, fin&, flag As Boolean, s As Shape
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For Each cel In Intersect([A:A], Me.UsedRange.EntireRow)
If cel.Interior.Color = [L3].Interior.Color Then deb = cel.Row + 1
If cel.Interior.ColorIndex = xlNone And _
cel.Borders(xlEdgeBottom).LineStyle <> xlNone Then fin = cel.Row
If deb And fin >= deb Then
Rows(deb & ":" & fin).Hidden = Not Rows(fin).Hidden
deb = 0
If Not flag Then
flag = True
For Each s In ActiveSheet.Shapes
With s.TextFrame.Characters
If .Text = "Masquer" Or .Text = "Afficher" Then _
.Text = IIf(Rows(fin).Hidden, "Afficher", "Masquer")
End With
Next
End If
End If
Next
Application.Calculation = xlCalculationAutomatic
End Sub