Function MatriceRecherche(recherche As Range)
Application.Volatile
If recherche(1) = "" Then End 'la fonction renvoie une valeur d'erreur
Dim P As Range, c As Range, coul&, a, col%, i%
With recherche(1)
Set P = .Parent.Range("A1", .Parent.UsedRange)
Set c = P.Find(.Cells, .Cells, xlValues, xlWhole)
If c.Address = .Address Then End 'la fonction renvoie une valeur d'erreur
coul = .Interior.Color
End With
Set P = Intersect(c.EntireRow, P)
a = P
col = c.Column
For i = 1 To UBound(a, 2)
If i <= col Or P(1, i).Interior.Color <> coul Then a(1, i) = ""
Next
MatriceRecherche = a
End Function