Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address <> "$B$1" Then Exit Sub
Dim t, rest(), deb&, fin&, i&, x, j&, y, sens%
Cancel = True
t = Range("A1", Range("A" & Rows.Count).End(xlUp)(2)) 'au moins 2 éléments
ReDim rest(1 To UBound(t), 1 To 1)
deb = 2
fin = UBound(t) - 1
1 For i = deb To fin
'---détermination du sens---
If i = deb Then
x = t(i - 1, 1)
For j = i To fin
y = t(j, 1)
sens = IIf(y > x, 1, IIf(y < x, -1, 0))
If sens Then Exit For
Next
i = j
End If
'---détermination de l'interruption de série---
If sens = 1 And t(i, 1) < t(i - 1, 1) Or sens = -1 And t(i, 1) > t(i - 1, 1) Then
rest(i, 1) = "X"
deb = i + 1
GoTo 1
End If
Next
'---restitution---
[B1].Resize(UBound(rest)) = rest
End Sub