bonsoir !!!
merci pour ton lien : j'y étais presque mais cela ne veut toujours pas tourner ...... tu pourrais m'aider si tu as du temps
merci
Option Explicit
Dim Cell As Range
Dim a, b, c, d, l As Byte
Private Sub CommandButton1_Click()
For l = 9 To Range("D8").End(xlDown).Row
a = 0
b = 0
'c = 0
'd = 0
For Each Cell In Range("D" & l & ":AA" & l)
If Cell.Interior.ColorIndex = Range("AC6").Interior.ColorIndex Then a = a + 1
If Cell.Interior.ColorIndex = Range("AD6").Interior.ColorIndex Then b = b + 1
' If Cell.Font.ColorIndex = Range("J8").Font.ColorIndex Then c = c + Cell.Value
'If Cell.Font.ColorIndex = Range("K8").Font.ColorIndex Then d = d + Cell.Value
Next Cell
Range("AC" & l) = a
Range("AB" & l) = a
Range("AD" & l) = b
Range("AD" & l) = b
'Range("J" & l) = c
'Range("K" & l) = d
Next l
End Sub