1. Welcome to Chandoo.org Forums. Short message for you

    Hi Guest,

    Thanks for joining Chandoo.org forums. We are here to make you awesome in Excel. Before you post your first question, please read this short introduction guide. When posting or responding to questions please remember our values at Chandoo.org are: Humility, Passion, Fun, Awesomeness, Simplicity, Sharing Remember that we have people here for whom English is not there first language and we need to allow for this in our dealings.

    Yours,
    Chandoo
  2. Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  3. When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Updating data labels for charts with two-layer X-axis

Discussion in 'Discuss Data Visualizations and Charting' started by ChrisFB, Dec 5, 2017.

  1. ChrisFB

    ChrisFB New Member

    Messages:
    1
    Hi! I hope I explain this well enough ...

    I have a chart with a two-layer X-axis. I wish to only display the data labels for the last data points in each grouping. On the image below, I only want to display the data labels for 05-Dec-2017 in the Red, White, Blue, Green, and Pink regions. While I can certainly add the labels manually, others will use the file who may not not be very Excel-savvy so I wish to automate this process.

    ScreenShot.JPG

    I found code here on these forums that will update the data label for the last points in a series and it works well as you can see in the screenshot. (FYI, I've removed the fill for the text for the first two data series as I really only need the last two since they sum to 100%).

    Does anyone have suggestions as to how to modify the VBA found in the link provided to achieve the desired result?

    Thanks in advance for any and all help!

    Chris
  2. p45cal

    p45cal Well-Known Member

    Messages:
    923
    Give us a file with these data and chart so we can experiment. No-one's going to set up the workbook like yours from a picture.
  3. Hui

    Hui Excel Ninja Staff Member

    Messages:
    10,836
    Chris

    Firstly, Welcome to the Chandoo.org Forums

    Why not add a Data Label to all series and use formula in that range to either set a blank or a value depending on its position.

    Supply a sample file is the preferred method to derive a more targeted solution

Share This Page