I am trying to make a macro that creates a chart from three selected columns. It works fine but I am trying to make column 1 (A:A) always apart of the range and then just select the remaining to columns I need as there are multiple charts i need to make from a data sheet
Sub Charter()
Dim my_range As Range
Set my_range = ("A:A", Selection)
ActiveSheet.Shapes.AddChart2(201, xlColumnClustered).Select
ActiveChart.FullSeriesCollection(1).ChartType = xlColumnClustered
ActiveChart.FullSeriesCollection(1).AxisGroup = 1
ActiveChart.FullSeriesCollection(2).ChartType = xlLine
ActiveChart.FullSeriesCollection(2).AxisGroup = 1
ActiveChart.FullSeriesCollection(1).ChartType = xlXYScatter
ActiveChart.FullSeriesCollection(1).AxisGroup = 1
ActiveChart.SetSourceData Source:=my_range
Cells(1, 1).Select
End Sub
I get an
"Compile error: Syntax error"
at the Set my_range = ("A:A", Selection)
Set my_range = ActiveSheet.Range("A:A")? - braXSelection- Zacchini