+ Reply to Thread
Results 1 to 5 of 5

VBA to colour data labels same as line colour - dynamic chart

  1. #1
    Registered User
    Join Date
    08-07-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    86

    VBA to colour data labels same as line colour - dynamic chart

    Hi
    I have a dynamic chart with a varying number of data series.
    I would like to create a macro to make the data labels colour match the line colour.

    I have tried the code below, but it seems to match 1 data series, but the rest - the data labels are coloured white?
    Any ideas on how to do this?

    Thanks

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    08-07-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    86

    Re: VBA to colour data labels same as line colour - dynamic chart

    Anyone...?

  3. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: VBA to colour data labels same as line colour - dynamic chart

    hi Jabba69,

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: VBA to colour data labels same as line colour - dynamic chart

    or with you syntax:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-07-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    86

    Re: VBA to colour data labels same as line colour - dynamic chart

    Thanks watersev
    I tried the second syntax, and it did the same as my code - coloured data labels in white.

    But it got me thinking, and a bit of playing around made me realise that it was making white for the data series that were automatically allocated a colour. When I select a series and pick a line colour, the code works (yours and mine).

    I can work with this, although ideally it be better if it automatically recognised the line colour (even if auto generated).

    Thanks

+ 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. Changing colour of bar chart, whilst keeping the labels on x-axis
    By trueng in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 03-16-2013, 06:05 AM
  2. to change the colour of the data labels in a chart
    By saji in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-18-2013, 05:49 AM
  3. Replies: 1
    Last Post: 08-12-2011, 04:31 PM
  4. Colour change column chart based on cell colour
    By Alice21 in forum Excel General
    Replies: 11
    Last Post: 04-05-2011, 10:10 AM
  5. Line Chart colour changes
    By Crazornz in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-27-2011, 11:24 AM

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