Function SommeCouleurFond(PlageSomme As Range, PlageCouleur As Range) As Variant
'*********************************************************
' Effectuer la somme des cellules en couleur *
'*********************************************************
Dim Cel As Range
Dim Som As Double
If PlageCouleur.Cells.Count > 1 Then
MsgBox "La plage couleur ne doit contenir qu'une cellule", vbOKOnly, "Erreur de saisie"
Exit Function
End If
For Each Cel In PlageSomme
If Cel.Interior.ColorIndex = PlageCouleur.Interior.ColorIndex Then Som = Som + Cel
Next
SommeCouleurFond = Som
End Function