Function SomCoul() As Currency
Dim Plage As Range, Cellule As Range
Dim coul As Integer
Application.Volatile
coul = Application.Caller.Font.ColorIndex
With ActiveSheet
Set Cellule = .UsedRange.Cells(.UsedRange.Count)
Set Plage = Union(.Cells.SpecialCells(xlCellTypeConstants, 1), _
.Cells.SpecialCells(xlCellTypeFormulas, 1))
Set Plage = Application.Intersect(.Range(.Cells(4, 2), Cellule), Plage)
For Each Cellule In Plage
If Cellule.Font.ColorIndex = coul Then
SomCoul = SomCoul + Cellule.Value
End If
Next Cellule
End With
End Function