【发布时间】:2015-08-07 21:24:13
【问题描述】:
我有一个代码可以将图表上每个系列的最后一个点更改为图例名称。但是,我不希望前4个系列的最后一点更改为图例名称。有人对更改此代码以跳过前 4 个系列并标记每个系列的最后一点有任何建议吗?
For Each mySrs In ActiveChart.SeriesCollection 'change this function so every series after series 4 changes ast point
With mySrs
nPts = .Points.Count
mySrs.Points(nPts).ApplyDataLabels _
Type:=xlDataLabelsShowValue, _
AutoText:=True, LegendKey:=False
mySrs.Points(nPts).DataLabel.Text = mySrs.Name
mySrs.Points(nPts).DataLabel.Orientation = 90
mySrs.Points(nPts).DataLabel.Font.Bold = True
End With
Next
【问题讨论】: