Option Explicit
Function som_couleur(plage As Range, couleur As Integer)
Dim r As Range, nb As Double
Application.Volatile
nb = 0
For Each r In plage
If r.Interior.ColorIndex = couleur Then
nb = nb + r.Value
End If
Next
som_couleur = nb
End Function
Function cellCouleur(c As Range)
cellCouleur = c.Interior.ColorIndex
End Function