somme de couleurs

A

arvin

Guest
bonjour à tous !!!


j'a un souci : j'essaie depuis qq temps de faire la somme par ligne de cellules en couleur ou non (ci joint mon tableau) -> .... est ce possible surtout de faire la somme par ligne .... j'ai regardé dans la zone telecharger mais cela me semble bien complexe


qu'en pensez vous ?


merci à tous
 

Pièces jointes

  • chiffres.zip
    15.7 KB · Affichages: 21
  • chiffres.zip
    15.7 KB · Affichages: 22
  • chiffres.zip
    15.7 KB · Affichages: 22
A

arvin

Guest
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
 
D

Dan

Guest
Bonsoir,

Désolé pour le retard mais j'ai de gros pb personnel pour l'instant. Vite fait je retrouve ce fil où tu peux je epnse trouver une réponse en remplaçant Cell par Valeur (<http://www.excel-downloads.com/html/French/forum/messages/1_66306_24012.htm> - post de Myta en date du 29/03).

Si pb n'hésite pas.

@+ Dan
 

Statistiques des forums

Discussions
314 203
Messages
2 107 176
Membres
109 766
dernier inscrit
pleutre