I am attempting to create a scatter plot with multiple series from the following table that extends to row 278:
I want to create a scatterplot that displays a new series for each row, where the Y-axis and X-axis values span the 10 years shown (2014-2023).
I recorded a macro of me manually adding two of the series:
Sub Macro3()
'
' Macro3 Macro
'
'
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveChart.SeriesCollection.NewSeries
ActiveChart.FullSeriesCollection(1).XValues = "=Sheet1!$B$3:$K$3"
ActiveChart.FullSeriesCollection(1).Values = "=Sheet1!$L$3:$U$3"
ActiveChart.SeriesCollection.NewSeries
ActiveChart.FullSeriesCollection(2).XValues = "=Sheet1!$B$4:$K$4"
ActiveChart.FullSeriesCollection(2).Values = "=Sheet1!$L$4:$U$4"
End Sub
I would like to make it so that the code will automatically create the 250+ series for each new row in the Spreadsheet. Any ideas on how to go about this? I have very little knowledge of VBA… Thank you!!!
I tried watching dozens of YouTube tutorials but none are targeted to this exact scenario.
Ben Roman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.