ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Plotting a number of single point series on a scatter graph (https://www.excelbanter.com/excel-programming/417356-plotting-number-single-point-series-scatter-graph.html)

Will[_15_]

Plotting a number of single point series on a scatter graph
 
Hi,

I have a large number of points I want to plot on a scatter graph with
named series and I don't want to do this manually. I have tried the
following approach unsuccessfully. I have searched this forum and
previous advice does nto seem to work.

Any help much appreciated.

Thanks,

Will



Dim counter As Integer

counter = 7

Do Until counter = 133

ActiveSheet.ChartObjects("Chart 7").Activate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(counter).XValues = "=Sheet1!
R(counter)C3"
ActiveChart.SeriesCollection(counter).Values = "=Sheet1!
R(counter)C2"
ActiveChart.SeriesCollection(counter).Name = "=Sheet1!
R(counter)C1"
counter = counter + 1
Loop

End Sub

Jon Peltier

Plotting a number of single point series on a scatter graph
 
ActiveChart.SeriesCollection(counter).XValues = "=Sheet1!R" & counter & "C3"

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Will" wrote in message
...
Hi,

I have a large number of points I want to plot on a scatter graph with
named series and I don't want to do this manually. I have tried the
following approach unsuccessfully. I have searched this forum and
previous advice does nto seem to work.

Any help much appreciated.

Thanks,

Will



Dim counter As Integer

counter = 7

Do Until counter = 133

ActiveSheet.ChartObjects("Chart 7").Activate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(counter).XValues = "=Sheet1!
R(counter)C3"
ActiveChart.SeriesCollection(counter).Values = "=Sheet1!
R(counter)C2"
ActiveChart.SeriesCollection(counter).Name = "=Sheet1!
R(counter)C1"
counter = counter + 1
Loop

End Sub




Will[_15_]

Plotting a number of single point series on a scatter graph
 
Perfect, many thanks Jon.



All times are GMT +1. The time now is 12:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com