Public Function SomCoul(p As Range, c As Range, val As String)
Dim coul As Long, s, cel
Application.Volatile
coul = c.Interior.ColorIndex
s = 0
For Each c In p
If c.Interior.ColorIndex = coul And val Like Cells(c.Row, (c.Column) - 2) Then s = s + c.Value
Next c
SomCoul = s
End Function