Function Recherche_OGO_2(P As Range, Chx As Range)
Dim a(), i&, n&
ReDim a(1 To 2, 1 To 1)
For i = 1 To P.Count
If P(i) = "OGO_2" Then
n = n + 1
If n = 3 Then Exit Function
a(n, 1) = Chx(i)
End If
Next
Recherche_OGO_2 = a 'vecteur colonne
End Function
Function Recherche_OR(P1 As Range, P2 As Range, Chx As Range)
Dim a(), i&, n&
ReDim a(1 To 2, 1 To 1)
For i = 1 To P1.Count
If P1(i) <> "" And P1(i - 1) <> "" And P1(i + 1) <> "" And P1(i - 1) = P1(i + 1) _
And P1(i) <> P1(i - 1) And P2(i - 1) = P2(i) And P2(i) = P2(i + 1) Then 'c'est la formule de la MFC
n = n + 1
If n = 3 Then Exit Function
a(n, 1) = Chx(i)
End If
Next
Recherche_OR = a 'vecteur colonne
End Function