Bonjour Vincente et le forum,
Voila une macro qui permet de créer un graphique depuis une plage variable en colonne B.
C'est un exemple que tu dois pouvoir adapter pour ton problème.
Sub Graphique()
Dim L As Integer
Dim ch As ChartObject
Application.ScreenUpdating = False
With Worksheets('Feuil1')
L = Range('B65000').End(xlUp).Row
'Création du nouveau graphique
Set ch = .ChartObjects.Add(250, 30, 450, 350)
ch.Chart.ChartWizard Source:=.Range('B2:B' & L), _
gallery:=xlLine, Title:='RELEVE TEMPERATURES'
.ChartObjects(1).Select
With .ChartObjects(1).Chart
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = 'HORAIRES'
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = 'TEMPERATURES'
.Legend.Delete
End With
Range('A1').Select
End With
Application.ScreenUpdating = True
End Sub
Cordialement
Bernard