i trying create macro enter ranges within chart's data labels via "label contains: value cells" option. each label corresponds row within sheet such =breakdown!$b$27:$k$27
. recorded macro find language action , came as:
activechart.seriescollection(i).datalabels.format.textframe2.textrange. _ insertchartfield msochartfieldrange, "=breakdown!$b$27:$k$27", 0
i can loop through seriescollection "dim integer". there way can set =breakdown!$b$27:$k$27
string or variables cell numbers can cycle through rows?
using string concatenate operator &
, cstr function converts expression string, it'll work out well.
"=breakdown!$b$" & cstr(i) & ":$k$" & cstr(i)
Comments
Post a Comment