Sub
chart_fuellen()
Dim
i
As
Long
Dim
Mittelwert
Dim
Standardabweichung
Dim
t(1
To
9)
Dim
xspalte
xspalte = ActiveSheet.Range(
"A1:A9"
)
Mittelwert = Application.WorksheetFunction.Average(ActiveSheet.Range(
"A1:A9"
))
Standardabweichung = Application.WorksheetFunction.StDev(ActiveSheet.Range(
"D1"
), ActiveSheet.Range(
"A1:A9"
))
For
i = 1
To
9
t(i) = ActiveSheet.Cells(i, 1).Value
t(i) = Application.WorksheetFunction.NormDist(t(i), Mittelwert, Standardabweichung,
False
)
Next
i
ActiveSheet.Range(
"A1:A9"
).
Select
Charts.Add
ActiveChart.ChartType = xlXYScatterLines
ActiveChart.SeriesCollection(1).XValues = xspalte
ActiveChart.SeriesCollection(1).Values = t
ActiveChart.Location Where:=xlLocationAsObject, Name:=
"Tabelle1"
End
Sub