Voici le problème, je désire automatiser la création graphique.
J'ai un tableau composée de lignes, chaque ligne comprend :
Le nom de la série ; valeur 1 ; valeur 2 ; valeur 3 ; valeur 4 ; le dit graphique (un radar reprenant les 4 valeurs et avec le nom d ela série comme titre).
Facile, mais vu qu'il y a 200 lignes, je souhaiterais bien automatiser la création de ligne.
J'ai essayé de créer une macro, mais il me fait x fois des graph avec les valeurs de la ligne ayant servi de modèle.
Si vous avez des idées...
Voici le code de la macro qui NE fonctionne PAS :
Sub Graph_auto()
'
' Graph_auto Macro
' Macro enregistrée le 05/02/2008 par Ph.
'
' Touche de raccourci du clavier: Ctrl+ù
'
ActiveCell.Offset(0, -5).Range("A1:E1").Select
Range("A3:E3").Select
Charts.Add
ActiveChart.ChartType = xlRadarFilled
ActiveChart.SetSourceData Source:=Sheets("Feuil1").Range("A3:E3"), PlotBy:= _
xlRows
ActiveChart.SeriesCollection(1).XValues = "=Feuil1!R1C2:R1C5"
ActiveChart.Location Where:=xlLocationAsObject, Name:="Feuil1"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "B"
End With
With ActiveChart.Axes(xlCategory)
.HasMajorGridlines = False
.HasMinorGridlines = False
End With
With ActiveChart.Axes(xlValue)
.HasMajorGridlines = False
.HasMinorGridlines = False
End With
ActiveChart.HasLegend = False
ActiveSheet.Shapes("Graphique 2").ScaleWidth 0.72, msoFalse, _
msoScaleFromBottomRight
ActiveSheet.Shapes("Graphique 2").ScaleHeight 0.4, msoFalse, _
msoScaleFromBottomRight
ActiveSheet.Shapes("Graphique 2").ScaleWidth 1.19, msoFalse, _
msoScaleFromBottomRight
ActiveSheet.Shapes("Graphique 2").ScaleHeight 1.93, msoFalse, _
msoScaleFromBottomRight
ActiveSheet.Shapes("Graphique 2").ScaleWidth 0.89, msoFalse, _
msoScaleFromTopLeft
ActiveSheet.Shapes("Graphique 2").ScaleHeight 0.89, msoFalse, _
msoScaleFromTopLeft
End Sub
D'avance merci.