Do
Set
name = Application.InputBox(
"DiagrammName auswählen"
,
"Zielzelle wählen"
, Type:=8)
Set
y = Application.InputBox(
"DiagrammZeilen auswählen"
,
"Zielzelle wählen"
, Type:=8)
ErsteZelle = y.Row
AnzahlZelle = y.Count
Ausgleich = ErsteZelle - 1
ActiveSheet.Shapes.AddChart.
Select
ActiveChart.ChartType = xlBubble
With
ActiveChart
For
n = .SeriesCollection.Count
To
1
Step
-1
.SeriesCollection(n).Delete
.HasTitle =
True
.ChartTitle.Characters.Text = name
Next
n
End
With
For
i = 1
To
AnzahlZelle
x = Ausgleich + i
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(i).name = Sheets(1).Cells(x, 1)
ActiveChart.SeriesCollection(i).XValues = Sheets(1).Cells(x, 3)
ActiveChart.SeriesCollection(i).Values = Sheets(1).Cells(x, 4)
ActiveChart.SeriesCollection(i).BubbleSizes = Sheets(1).Cells(x, 2)
Next
i
Loop