Juggler_IN
Active Member
- Joined
- Nov 19, 2014
- Messages
- 349
- Office Version
- 2003 or older
- Platform
- Windows
I want to pass a computed value n number of times in a Chart. For example, in an already plotted chart with 36 values, I want to add another series (say, mean score) to the Chart. I tired to put a macro but it is not giving the output.
I want to achieve Chrt1 output using Chrt2 logic.
VBA Code:
Sub Chrt1()
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(2).Values = _
"={50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50}"
End Sub
Sub Chrt2()
Dim u$
u=Application.WorksheetFunction.Rept("50",36)
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(2).Values = _
"={" & u & "}"""
End Sub
I want to achieve Chrt1 output using Chrt2 logic.