+ Reply to Thread
Results 1 to 7 of 7

attach labels to secondary x-axis values

  1. #1
    Registered User
    Join Date
    10-13-2009
    Location
    Carlsbad
    MS-Off Ver
    Excel 2007
    Posts
    8

    attach labels to secondary x-axis values

    i have a chart that combines an area chart with a scatter chart. I would like to place some labels on the secondary x axis. currently the values on the axis are 0%, 20%, 40%, etc going up as high as neccessary depending on the values being plotted.
    There is an associated date that I can calculate to go with each of the %. I would like to be able to print the date right next to the %... like
    0% - 10/01/09
    20% - 10/15/09
    40% - 11/3/09
    etc
    is this possible?

    thx
    mike
    Attached Files Attached Files

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: attach labels to secondary x-axis values

    You can use the data labels of a dummy xy-scatter series to mimic the axis labels.

    Use this free addin to link data labels to cells.
    http://www.appspro.com/Utilities/ChartLabeler.htm
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    10-13-2009
    Location
    Carlsbad
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: attach labels to secondary x-axis values

    Andy
    thanks for the reply but I still need a little help

    I need the dates to be attached to the % values on the Y-Axis instead of X. X-Axis will always be 0 to 100% by 20% increments
    The Y-Axis will always start at 0% and go up in 20% increments but will stop at 120% or greater depending on the data being plotted. I will need to caluclate the date for each of the major units and then attach them after I calculate how many major axis labels there will be.

    I tried to copy what I thought you did by adding another series with the X value at 100 for each data point (like where you had value set at 0), but I didn't get it to work.

    Also, I have to distribute this to 4 engineers who use this spreadsheet to communicate their project status, so I would rather add the axis labels using VBA if possible so I dont have to get them all to load the utility
    Sorry to be such a pain, but can you send me in that direction?
    thanks
    Mike

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: attach labels to secondary x-axis values

    You only need the addin to setup the original chart.

    Here is code to do it
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-13-2009
    Location
    Carlsbad
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: attach labels to secondary x-axis values

    Andy
    thanks for your help. I got the chart to do what I want and now I have a new problem... actually 2
    First, the labels that I'm adding to the right side of the chart are faded. Is there a way to get them to be the same as the rest of the labels. I tried bold but that didn't fix it.
    2nd, we use these charts for updates to sr management so they are copied and pasted into word docs. When I copy the chart into a word doc, the axis titles get printed on top of the axis labels
    I've attached the pdf from the word doc.
    thanks again
    Attached Files Attached Files

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: attach labels to secondary x-axis values

    The faded text is caused by the true axis labels being in white font rather than set to None.

    The horizontal axis line can be removed by setting the line to none.

  7. #7
    Registered User
    Join Date
    10-13-2009
    Location
    Carlsbad
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: attach labels to secondary x-axis values

    got it
    thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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