Sub GRAPH()
'
' GRAPH Macro
' Macro enregistrée le 14/10/2008 par utiliseur
num = 1
For n = 1 To Range("C65536").End(xlUp).Row
If InStr(Sheets("Général").Range("C" & n).FormulaLocal, "SOUS.TOTAL") <> 0 Then
ligne = n
Charts.Add
ActiveChart.ChartType = xl3DColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Général").Range("H" & ligne & ":L" & ligne), PlotBy:=xlColumns
[COLOR=blue]If Sheets("Général").Range("F" & n) = "" Then[/COLOR]
[COLOR=blue] nom = "Total General"[/COLOR]
[COLOR=blue]Else[/COLOR]
[COLOR=blue] nom = Sheets("Général").Range("F" & n)[/COLOR]
[COLOR=blue]End If[/COLOR]
ActiveChart.Location Where:=xlLocationAsNewSheet, Name:=[COLOR=blue]nom[/COLOR]
num = num + 1
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Répartion de l'offre de formation par domaines"
.Axes(xlCategory).HasTitle = True
.Axes(xlCategory).AxisTitle.Characters.Text = "Domaine"
.Axes(xlSeries).HasTitle = False
.Axes(xlValue).HasTitle = True
.Axes(xlValue).AxisTitle.Characters.Text = "Nombre"
End With
End If
Next n
End Sub