K
Klemen25
Hello
I found and successfully used the below stated macro for adding data
labels on the last data point.
Could someone of you experts help me with creating a macro, that would
add data labels on every second point (when there are a lot of data
the labels are too crowded, and to erase manually every second label
is quite time consuming)
Thank you all!
Sub LastPoinLabel()
Dim mySrs As Series
Dim nPts As Long
On Error GoTo Error
For Each mySrs In ActiveChart.SeriesCollection
With mySrs
nPts = .Points.Count
mySrs.Points(nPts).ApplyDataLabels _
Type:=xlDataLabelsShowValue, _
AutoText:=True, LegendKey:=False
End With
Next
Error: Exit Sub
End Sub
I found and successfully used the below stated macro for adding data
labels on the last data point.
Could someone of you experts help me with creating a macro, that would
add data labels on every second point (when there are a lot of data
the labels are too crowded, and to erase manually every second label
is quite time consuming)
Thank you all!
Sub LastPoinLabel()
Dim mySrs As Series
Dim nPts As Long
On Error GoTo Error
For Each mySrs In ActiveChart.SeriesCollection
With mySrs
nPts = .Points.Count
mySrs.Points(nPts).ApplyDataLabels _
Type:=xlDataLabelsShowValue, _
AutoText:=True, LegendKey:=False
End With
Next
Error: Exit Sub
End Sub