+ Reply to Thread
Results 1 to 5 of 5

How to Custom Label a Single Data Point When Adding New Series

  1. #1
    Registered User
    Join Date
    10-19-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Excel 2010
    Posts
    8

    How to Custom Label a Single Data Point When Adding New Series

    I have a two part problem/question:
    1. I need to label a specific data point on a series.
    2. I need that label to have custom text & the value of the data point (e.g. "PTA: $108,750)

    The details:
    The chart is generated by user inputs. I have a process that creates the chart and uses multiple sub processes to add the series, scale the x-axis, and modify the chart legend. Manipulating the series by number isn't reliable as it may be the 7th or 11th series, depending on user inputs. To keep the chart reliable, each time the user navigates to the worksheet containing the chart, it deletes and re-adds. What I have so far is working *perfectly* for what I need. I want to be able to label the specific point when the series is created.

    Here's the code I'm using to add the new series:
    Please Login or Register  to view this content.
    Thank you in advance for any assistance.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,858

    Re: How to Custom Label a Single Data Point When Adding New Series

    This page has code that will label the last point in a series. It should be easy enough to modify this code to label any single point in the data series with whatever text you would like: http://peltiertech.com/Excel/Charts/LabelLastPoint.html
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    10-19-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How to Custom Label a Single Data Point When Adding New Series

    Thank you. I probably should have mentioned that I'm relatively new to VBA programming. I have looked at the link you provided (both now and during my original internet searches) and either it doesn't do what I need or I cannot figure out how to modify it.

    Of the eight or twelve series present on the chart, I need to modify one specific point on one specific series. At the time the series is added it could be the 7th series or the 11th series but it's always the 5th data point. Every reference I've seen about data labels includes some reference to activating the series collection by number or (as in Mr. Peltier's post) labels points on every series.

    I promise, I have tried to figure this out and just cannot.

    Lisa

  4. #4
    Registered User
    Join Date
    10-19-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How to Custom Label a Single Data Point When Adding New Series

    Apparently sometimes you just need to take a break. I figured out how to add the label to the point I want but I cannot figure out how to get it formatted.

    The revised code looks like this:
    Please Login or Register  to view this content.
    The result is the following data label: PTA: 112495000

    I need to be able to format the number portion to, at a minium, show $112,495,000

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,858

    Re: How to Custom Label a Single Data Point When Adding New Series

    I would suggest using the Format() function. https://msdn.microsoft.com/en-us/lib.../gg251755.aspx I would expect a format code such as "$000,000,000" would be close to what you want.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Display the last point's data label in series with VBA
    By cesna123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-08-2010, 11:13 AM
  2. Pie Chart - Adding 2nd data label series?
    By Bjornago in forum Excel General
    Replies: 6
    Last Post: 01-19-2010, 08:39 PM
  3. Series Labeling excel chart at single data point
    By Stuball in forum Excel Charting & Pivots
    Replies: 10
    Last Post: 01-26-2009, 11:37 AM
  4. add only vertical error bars to a single data point in a series.
    By cwagner in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 09-24-2007, 03:27 PM
  5. [SOLVED] Adding a custom label to a series point
    By den1s in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-07-2006, 09:15 PM
  6. Adding a label to a data point in a chart??
    By Fish in forum Excel General
    Replies: 1
    Last Post: 03-13-2006, 07:25 PM
  7. Single Data Point on a new Series
    By bocjoel in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-15-2005, 12:35 PM
  8. Error bars for a single data point not whole series
    By Helen in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-13-2005, 02:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1