I’d like to know how to change a range using vba. When I’ve wanted to change something (like this) before, I’ve just concatenated a variable and placed it between the parentheses – but it does not work with Range.
I want this, as the result.
ActiveChart.SetSourceData Source:=Sheets(“Data”).Range(“a2:a40,d2:d40″), _
PlotBy:=xlColumns
I’m trying to achieve it, like this
Dim a as integer, b as integer, c as string, d as string, e as string
a=40
b=40
c='”a2:a”
d=”,d2:d”‘
e=concatenate(a & c & d & 4)
ActiveChart.SetSourceData Source:=Sheets(“Data”).Range(e), _
PlotBy:=xlColumns