hello,

I am trying to create a chart defined with multiple ranges. I define one series and then I add more series in a loop. All using the cells command so I can use a loop.
The first step is selecting two colums (again using the cells command). Tried the code below. It does not work

Sub CreateCa()
Dim Range1, Range2 As Range
Dim UnionRange As Range
Set Range1 = Range(Sheet1.Cells(2, 1), Sheet1.Cells(101, 1))
Set Range2 = Range(Sheet1.Cells(2, 11), Sheet1.Cells(101, 11))
Set UnionRange = Union(Range("Range1"), Range("Range2"))
With UnionRange
.Activate
ActiveSheet.Shapes.AddChart2(240, xlXYScatterLinesNoMarkers).Select
End With
End Sub

Any ideas?

Thank You