1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Sub guizados()
With Worksheets("Feuil1")
.Shapes.AddChart.Select
With ActiveChart
.ChartType = xlXYScatterSmoothNoMarkers
Do Until .SeriesCollection.Count = 0
.SeriesCollection(1).Delete
Loop
For i = 1 To Worksheets("Feuil1").Rows(1).Find("*", , , , , xlPrevious).Column Step 2
.SeriesCollection.NewSeries
.SeriesCollection((i + 1) / 2).XValues = Range(Worksheets("Feuil1").Cells(1, i), Worksheets("Feuil1").Cells(Worksheets("Feuil1").Columns(i).Find("*", , , , , xlPrevious).Row, i))
.SeriesCollection((i + 1) / 2).Values = Range(Worksheets("Feuil1").Cells(1, i + 1), Worksheets("Feuil1").Cells(Worksheets("Feuil1").Columns(i + 1).Find("*", , , , , xlPrevious).Row, i + 1))
Next i
End With
End With
End Sub |
Partager