Sub Graphique() Dim Sht As Worksheet
' Indiquer à VBA avec qui travailler
' Avec la feuille active
With ActiveSheet
.Range("A1:I6").Copy Destination:=.Range("A8")
Application.CutCopyMode = False
.Range("D10:D13").FormulaLocal = "=D3-SOMME(B3:C3)"
'.Range("D10:D13").AutoFill
.Range("F10:F13").FormulaLocal = "=F3-SOMME(D3:E3)"
.Range("H10:H13").FormulaLocal = "=H3-SOMME(F3:G3)"
End With
' Définir la feuille active
Set Sht = ActiveSheet
' Créer le graphique
Sht.Shapes.AddChart(297).Select
' Avec le graphique actif
With ActiveChart
.SetSourceData Source:=Sht.Range("$A$8:$I$13")
.PlotBy = xlColumns
.Axes(xlCategory).ReversePlotOrder = True
.SetElement (msoElementChartTitleNone)
.Axes(xlValue).MinimumScale = 0.333333
.Axes(xlValue).MaximumScale = 0.708333
.Axes(xlValue).MajorUnit = 0.020833
.SeriesCollection(1).Format.Fill.Visible = msoFalse
.SeriesCollection(3).Format.Fill.Visible = msoFalse
.SeriesCollection(5).Format.Fill.Visible = msoFalse
'ActiveSheet.Shapes("Graphique 2").ScaleWidth 1.5770833333, msoFalse, _
msoScaleFromTopLeft
End With
End Sub