Data Labels - Intervals

LizCane

New Member
Joined
Nov 3, 2014
Messages
20
Hi,

I know you can amend the intervals on the the X-Axis of a chart, do you know if there is a way to change the intervals on the data labels on the chart? So rather than showing up at every data point, it only shows up at every 6 interval units for example?

Thanks in advance,
LC
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
put the data in as below - highlight the first series and set marker = none

then you will have the line for all the points but only markers at 13, 23, 34


12
1313
15
8
21
2323
25
28
32
3434
35

<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
Code:
' In case you need the code...


Sub DLabels()
Dim ch As Chart, i%, s As Series
Set ch = ActiveChart
For Each s In ch.SeriesCollection                       ' all series
    s.ApplyDataLabels
    For i = 1 To s.DataLabels.Count
        If i Mod 6 <> 0 Then s.DataLabels(i).Delete
    Next
Next
End Sub
 
Upvote 0
Code:
' In case you need the code...


Sub DLabels()
Dim ch As Chart, i%, s As Series
Set ch = ActiveChart
For Each s In ch.SeriesCollection                       ' all series
    s.ApplyDataLabels
    For i = 1 To s.DataLabels.Count
        If i Mod 6 <> 0 Then s.DataLabels(i).Delete
    Next
Next
End Sub

Hi Worf, thank you so much for this, this worked. Much appreciated.
LC
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top