Bonsoir Cruz, bonsoir à toutes et à tous
Je te joins un exemple que tu pourras adapter à tes besoins...
Code:
Option Explicit
Option Base 1
Sub ColorerSecteurs()
'
Dim ValeurSecteur As Variant
Dim Total#, i%
'
Application.ScreenUpdating = False
ActiveSheet.ChartObjects(1).Select
With ActiveChart.SeriesCollection(1)
ValeurSecteur = .Values
Total = 0#
For i = 1 To UBound(ValeurSecteur)
Total = Total + ValeurSecteur(i)
Next
For i = 1 To UBound(ValeurSecteur)
With .Points(i).Interior
If (ValeurSecteur(i) / Total) ‹ 0.2 Then
.ColorIndex = 3
Else
.ColorIndex = 6
End If
End With
Next i
End With
Range('A1').Select
Application.ScreenUpdating = False
End Sub
[file name=CruzGraphique.zip size=9814]http://www.excel-downloads.com/components/com_simpleboard/uploaded/files/CruzGraphique.zip[/file]
A+
