Function CompteSequence(Plage, pattern, Optional caseSensitive = 0) As Integer
Dim RegEx As Object, Ary As Variant, i As Long
Ary = Plage.Value
Set RegEx = CreateObject("VBScript.RegExp")
RegEx.pattern = pattern
RegEx.IgnoreCase = caseSensitive
CompteSequence = 0
For i = 1 To UBound(Ary)
If RegEx.Test(Ary(i, 1)) Then CompteSequence = CompteSequence + 1
Next i
End Function