Function Somme_Couleur(Plage As Range, Etalon As Range)
Dim Couleur%, Cellule As Range
Couleur = Etalon.FormatConditions(1).Interior.ColorIndex
Somme_Couleur = 0
For Each Cellule In Plage
If Cellule.FormatConditions.Count > 0 Then
If (Cellule.FormatConditions(1).Interior.ColorIndex = Couleur) And IsNumeric(Cellule.Value) Then Somme_Couleur = Somme_Couleur + Cellule.Value
End If
Next Cellule
End Function
Function Somme_Ecart(Plage As Range, Ecart%)
Dim Cellule As Range, Compteur#
Compteur = Ecart
For Each Cellule In Plage
If Compteur = Ecart Then
Somme_Ecart = Somme_Ecart + Cellule.Value
Compteur = 0
End If
Compteur = Compteur + 1
Next Cellule
End Function