Solved

Can't add data labels to data series on secondary axis

Posted on 2015-02-23
2
101 Views
Last Modified: 2016-02-10
Hello,
I've been trying to add data lables to a line data series on a secondary axis via vba.  The labels are not being displayed.  When I try to add the data labels manually, I get the following message, "The maximum number of data labels that can be displayed is 1000.  Some labels will be remitted from the chart"  .  The chart contains only 100 labels. I've attached the pdf file of the chart.

With objNewSeries
            .Name = "Aggregate LIFR (Non-NEX)"
            .Values = objXlDataSheet.Range("F:F")
            .AxisGroup = 2
            .ChartType = 65
            .Format.Line.Weight = 1
           .ApplyDataLabels
         .DataLabels.NumberFormat = "0.0%"
        End With

Open in new window

PDF-File.pdf
0
Comment
Question by:chtullu135
2 Comments
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 40627537
Hi,

maybe you could restrict the range

instead of

.Values = objXlDataSheet.Range("F:F")


.Values = objXlDataSheet.Range(Range("F1"), Range("F" & Cells.Rows.Count).End(xlUp))


Regards
0
 

Author Closing Comment

by:chtullu135
ID: 40634235
Thanks that's what I needed.  I just needed to modify the provided code so that it would work using late-binding.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now