+ Reply to Thread
Results 1 to 3 of 3

Custom Data Labels does not update with correct labels in a dynamic Scatter XY Plot Graph

  1. #1
    Registered User
    Join Date
    02-15-2014
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    2

    Custom Data Labels does not update with correct labels in a dynamic Scatter XY Plot Graph

    I have used a macro to add data labels to a scatter plot.

    I initially tried the add-ins which people have been recommended on this forum, but they do not work with my data,

    Basically, I have a dynamic table that a user selects to display the data they need. All the data points are displayed from one dynamic table into one dynamic XY Scatter graph/plot.

    For example, sales data by region (North, South, East and West) will show data points in the scatter plot for each region depending on the criteria set by the user from a drop-down menu.

    The scatter graph has a named range offset formula to ensure that it only reads the data in the columns and not the whole column. For example, North may have 50 sales lines, yet South has 30. The offset named range is added in the series when selecting the data so when North is selected, the range of the scatter graph includes 50 plots, but when South is selected it will change the range of the chart so it only includes 30 data points. This ensures the graph plots the data correctly and it works a charm (Thank You Mr Excel!! Excel Dynamic Chart #10 YouTube Vid tutorial).

    My problem is that I used someone's macro to add data labels. It works too. But, because I have a dynamic table, it does not take into account that my data labels and series range will change according to criteria.

    For example, it will correctly apply the data labels to the data points in the North Region. Change the region to South, the data points will change, but the data labels are being used from the North Region, not the South. That means I have the correct data points being plotted, but the wrong data labels (as it uses the first criteria data labels.

    I need a macro that will update the data labels every time the criteria changes.

    I do not want to use add-ins as they do not do what I need them to do.

    This is the macro I used. I got the VBA code from a tutorial blog http://www.wiseowl.co.uk/blog/s130/e...ls-problem.htm


    Please Login or Register  to view this content.
    Any help would be greatly appreciated!!! Thanks in advance!!

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

    Re: Custom Data Labels does not update with correct labels in a dynamic Scatter XY Plot Gr

    Hard to tell without example but I think the problem is that data label references are static.

    See this explanation and whether you can adapt you workbook
    http://www.andypope.info/ngs/ng57.htm
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    02-15-2014
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Custom Data Labels does not update with correct labels in a dynamic Scatter XY Plot Gr

    thanks andy.

+ 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. Update Scatter Plot Labels when data is updated?
    By rlrosenberg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2013, 09:29 PM
  2. Replies: 0
    Last Post: 03-20-2013, 05:51 PM
  3. Replies: 3
    Last Post: 10-09-2012, 03:55 AM
  4. [SOLVED] Scatter Plot Data Labels
    By Mike K. in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-22-2008, 10:12 AM
  5. Custom data labels on a scatter plot
    By Bradfro in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-20-2005, 08:06 AM

Tags for this Thread

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