Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping Through Chart Labels
Hello.
I am trying to write a loop (such as a For...Next or Do Until) to loop through all the Datalabels in a chart, evaluate whether they are below 3% value, and if so to remove the labels. There is only one SeriesCollection with multiple points (about 50.) I have written this code before to success, but using a Range to check for the value and not in a loop. Anyone out there help me or point me in the right direction? I appreciate the help. Thanks Dan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping Through Chart Labels
Here is some starting code for you.
Dim DL As DataLabel ActiveChart.ApplyDataLabels ShowValue:=True For Each DL In ActiveChart.SeriesCollection(1).DataLabels If CDbl(Left(DL.Text, Len(DL.Text) - 1)) < 3 Then DL.Delete End If Next Chrissy. "Dan Gesshel" wrote in message ... Hello. I am trying to write a loop (such as a For...Next or Do Until) to loop through all the Datalabels in a chart, evaluate whether they are below 3% value, and if so to remove the labels. There is only one SeriesCollection with multiple points (about 50.) I have written this code before to success, but using a Range to check for the value and not in a loop. Anyone out there help me or point me in the right direction? I appreciate the help. Thanks Dan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping Through Chart Labels
Here's a non-vba solution. Double click on the labels to format them,
click on the Number tab, and assign a custom number format like this one: [<0.03]"";0% - Jon ------- Jon Peltier, Microsoft Excel MVP http://www.geocities.com/jonpeltier/Excel/index.html _______ Dan Gesshel wrote: Hello. I am trying to write a loop (such as a For...Next or Do Until) to loop through all the Datalabels in a chart, evaluate whether they are below 3% value, and if so to remove the labels. There is only one SeriesCollection with multiple points (about 50.) I have written this code before to success, but using a Range to check for the value and not in a loop. Anyone out there help me or point me in the right direction? I appreciate the help. Thanks Dan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to change position of chart labels on line chart | Charts and Charting in Excel | |||
Pie Chart and Zero Value Labels | Charts and Charting in Excel | |||
Chart labels disappear - How do I refresh the chart? | Charts and Charting in Excel | |||
chart labels? | Charts and Charting in Excel | |||
Labels on a chart | Charts and Charting in Excel |