Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
Is there a way to determine how many data labels a series has? Thanks. Bill |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bill,
Try this routine. The error trap should handle problems caused by missing or gaps in your data plus the deletion of individual data labels within a series. Sub x() Dim intSeries As Integer Dim intPoint As Integer Dim intCountDataLabels As Integer On Error GoTo ErrCount With ActiveChart For intSeries = 1 To .SeriesCollection.Count With .SeriesCollection(intSeries) If .HasDataLabels Then intCountDataLabels = 0 For intPoint = 1 To .Points.Count If .Points(intPoint).HasDataLabel Then If Err.Number = 0 Then _ intCountDataLabels = intCountDataLabels + 1 End If Next MsgBox "Series " & intSeries & " has " & _ intCountDataLabels & " of out a possible " & .Points.Count Else MsgBox "Series " & intSeries & " has no data labels" End If End With Next End With Exit Sub ErrCount: intCountDataLabels = intCountDataLabels - 1 Resume Next End Sub Cheers Andy Bill wrote: Hello, Is there a way to determine how many data labels a series has? Thanks. Bill -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How select all data points/data labels at once (to format)? | Charts and Charting in Excel | |||
Data Labels- POssible to show data value and data label together? | Charts and Charting in Excel | |||
Setting hover data labels to cells other than source data | Charts and Charting in Excel | |||
Setting hover data labels to cells other than source data | Excel Discussion (Misc queries) | |||
renaming data labels by different cells than source data | Charts and Charting in Excel |