You have to access the chart.seriescollection(1).formula property.
Then parse the string to find the data column, and increment the column number. Remake the string, and reassign the formula property. You can use something like
s=activechart.SeriesCollection(1).formula
p1=instrrev(s,"!"
p2=instrrev(s,","
set cell=sheets("MyData".range(mid(s,p1+1,p2-p1-1)).offset(0,1)
activechart.SeriesCollection(1).formula=left(s,p1)+cell.address+mid(s,p2)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.