|
|
|
|
Configuration: Office 2000
bonjour
Tu as utilisé une fonction Excel pas très facile à utiliser et je ne sais pas colorer des portions de cellule. Par contre, j'ai fait cette petite macro qui met sur la ligne total le n° de ligne à la bonne couleur. J'ai supposé que ta ligne total était en fait la septième, la première étant le N° de mois. Sub total_couleurs()
Dim k As Integer
Dim l As Integer
Dim lig As Integer
lig = 7
For k = 1 To 12
Cells(lig, k).Value = "' 1 2 3 4 5 "
For l = 2 To 6
If Cells(l, k).Interior.ColorIndex > 0 Then
Cells(lig, k).Characters(Start:=((l - 2) * 3) + 1, Length:=3).Font.ColorIndex _
= Cells(l, k).Interior.ColorIndex
Else
Cells(lig, k).Characters(Start:=((l - 2) * 3) + 1, Length:=3).Font.ColorIndex = 2
End If
Next l
Next k
End Sub
Il faut mettre cette macro dans ta feuille après avoir lancé VBA editor (ALT + F11) puis la lancer avec menu outils/macro/macros/executer. Bon test. toujours zen |