Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Loops 循环浏览数据标签,选择下一行_Loops_Range_Labels - Fatal编程技术网

Loops 循环浏览数据标签,选择下一行

Loops 循环浏览数据标签,选择下一行,loops,range,labels,Loops,Range,Labels,当前参数适用于第一个条形图: ActiveChart.SeriesCollection(1).ApplyDataLabels ActiveChart.FullSeriesCollection(1).DataLabels.Select ActiveChart.SeriesCollection(1).DataLabels.Format.TextFrame2.TextRange. _ InsertChartField msoChartFieldRange, "='Percent of T

当前参数适用于第一个条形图:

 ActiveChart.SeriesCollection(1).ApplyDataLabels
 ActiveChart.FullSeriesCollection(1).DataLabels.Select
 ActiveChart.SeriesCollection(1).DataLabels.Format.TextFrame2.TextRange. _
    InsertChartField msoChartFieldRange, "='Percent of Total Change'!$E$4", 0
其中“=‘总变化百分比’!$E$4”是标签所在的图纸位置和单元格。注意:默认标签是一个值,我想根据选定的单元格/区域选择我的值

当我想循环遍历标签E4+n{其中n=1到19}时,问题就出现了 对于.Values代码,我使用了:

  .Values = Range("='Percent of Total Change'!$D$3").Offset(n, 0)
但是VBA不允许我对标签使用此偏移量


我也在尝试使用单元格(4+n,5)进行循环。

'LABELS Set S1=Range(“='Percent of Total Change'!$E$3”)。Offset(n,0)S1=(FormatPercent(S1,1))ActiveChart.SeriesCollection(1)。HasDataLabels=True ActiveChart.SeriesCollection(1)。DataLabels(1)。Text=S1如何跳过一个系列?然后跳过标记,但下一个系列索引是否仍保留?系列(1)、系列(2)、系列(3)-跳过、系列(4)…而不是系列(3)。