Consulting

Results 1 to 10 of 10

Thread: Linking a Chart's Series Point Label to a Cell

  1. #1

    Linking a Chart's Series Point Label to a Cell

    I started plotting some short horizontal lines on my stock charts to show (for example) the price that is 10% above the current price of the stock. On each line I create a point label that displays the price. I have it set up so that when the current stock price changes to a new value, then the line will move up or down to the new +/-10% level and the label displays the new price. That works fine.

    What I want is to manually change the label value from, say, ?$102.25? to be ?+10% $102.25?. In other words, I want to add a constant to the value displayed. But when I do that, then the dollar value no longer changes when the current price changes.

    If this were a text box or a Title box, then I could create a reference (link) to a cell value that included both the constant ?+10%? and the variable price ?$102.25?. But I can?t find a way to do that with Series point labels. Is there a way to make a point label value determined by the contents of a cell? (Hmmm, now that I think about it that sort of defeats the whole purpose of using a point label, which I guess is supposed to show the value of a point.)

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Sid, Can you post a small sample?
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    OK, Malcolm, here's a sample:

    I put a red arrow indicating the "+10%" line I plotted and showing the point label. That is a single label. The work around I have managed to use successfully is to create a point label for each end of the line. The label on the left will contain the constant "+10%" and the label on the right will contain the Excel-generated value of the point. Then I manually drag them around until they line up and appear to be one label. Klutzy, but better than nothing. The right label changes its value automatically when the plotted line changes position, which is what I wanted.

    Unfortunately, my attempt to add the image failed, although it worked in the test area.

  4. #4
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Quote Originally Posted by Cyberdude
    OK, Malcolm, here's a sample:
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  5. #5
    I added a comment to the previous reply indicating I have no idea how to add an image. (Phffft!) Perhaps my description will be adequate.

  6. #6
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Sid,
    I thought you could post a workbook with a simple spreadsheet and chart
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  7. #7
    The spreadsheet has no relevance to this annoyance. Let's just mark this as Solved (if I could), since I figured out a workaround. Thanx for the attempt to help, Malcolm.

  8. #8
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    OK Sid.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  9. #9
    MS Excel MVP VBAX Tutor
    Joined
    Mar 2005
    Posts
    246
    Location
    Quote Originally Posted by Cyberdude
    If this were a text box or a Title box, then I could create a reference (link) to a cell value that included both the constant ?+10%? and the variable price ?$102.25?. But I can?t find a way to do that with Series point labels. Is there a way to make a point label value determined by the contents of a cell? (Hmmm, now that I think about it that sort of defeats the whole purpose of using a point label, which I guess is supposed to show the value of a point.)
    This is pretty much the same process. Select the label, which takes one click to select the series of labels and another to select the individual label. Then press = and click on the cell.
    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Peltier Technical Services
    Tutorials and Custom Solutions
    http://PeltierTech.com
    _______

  10. #10
    Thanx, Jon. You know I tried that and it didn't work, but as I look at it, I'll bet I omitted the sheet name as a prefix because I typed in the full reference into the label instead on clickinig on the cell. I thought it was strange that Microsoft hadn't provided that feature for labels. That makes things a LOT easier. Thanks again, guy!

Posting Permissions

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