Sub MasqMatch3()
Dim c As Range
Dim firstAddress As String
Dim PremLig As Long, DerLig As Long
Application.ScreenUpdating = False
DerLig = Range("A65536").End(xlUp).Row
With Range("A3:A" & DerLig)
Set c = .Find("X", LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing Then
firstAddress = c.Address
If Range("A4") = "X" Then GoTo 1
PremLig = 4
Do
If Cells(c.Row - 1, 1) = "X" Then GoTo 1
Range("A" & PremLig & ":A" & c.Row - 1).EntireRow.Hidden = True
1 PremLig = c.Row + 1
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
Application.ScreenUpdating = True
End Sub