Function MATCOUL(Pcoul, Optional celcoul)
'Pcoul doit être un vecteur ligne ou colonne
Dim mat#(), coul As Variant, n&
ReDim mat(1 To Pcoul.Count)
On Error Resume Next
coul = celcoul.Interior.Color
For Each Pcoul In Pcoul
n = n + 1
If Pcoul.Interior.Color = coul Or IsEmpty(coul) Then mat(n) = Pcoul
Next
MATCOUL = mat 'vecteur ligne de nombres
End Function