Function TotalVersé(Plage As Range)
Dim Total As Long
On Error GoTo Fin
Total = 0
For Each Cell In Plage
If Cell.Interior.Color = RGB(226, 239, 217) And Cell < 40000 Then ' 40000= 06/07/2009 permet de discriminer les dates.
Total = Total + Cell
End If
Next
TotalVersé = Total
Fin:
End Function