Sub somme_couleur()
Dim derligne&, dercol&, a
derligne = Cells(Rows.Count, 1).End(3).Row
dercol = Cells(1, Columns.Count).End(1).Column
Range(Cells(derligne, 2), Cells(derligne, dercol)).ClearContents
For j = 2 To dercol
a = 0
For i = 2 To derligne - 1
'----si la couleur est incolore, blanche ou noir, on ne fait rien
If Cells(i, j).Interior.ColorIndex <> 1 And Cells(i, j).Interior.ColorIndex <> 2 And Cells(i, j).Interior.ColorIndex <> xlNone Then
a = a + 0.5
Else
End If
Next i
Cells(derligne, j).Value = a
Next j
End Sub