[SIZE=3][FONT=Times New Roman]Function SommeRouge(Plage As Range)[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]For Each cell In Plage[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]If cell.Interior.ColorIndex = 3 Then vSomme = vSomme + cell.Value[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]Next[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]SommeRouge = vSomme[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]End Function[/FONT][/SIZE]
[COLOR=blue]Public Function[/COLOR] NbrCouleurs(Plage [COLOR=blue]As[/COLOR] Range, Coul [COLOR=blue]As[/COLOR] Range)
[COLOR=blue]For Each[/COLOR] c [COLOR=blue]In[/COLOR] Plage
[COLOR=blue]If[/COLOR] c.Interior.ColorIndex = Coul.Interior.ColorIndex [COLOR=blue]Then[/COLOR] Var = Var + 1
[COLOR=blue]Next[/COLOR]
NbrCouleurs = Var
[COLOR=blue]End Function[/COLOR]