+ Reply to Thread
Results 1 to 5 of 5

Autofill chart columns based on label text

  1. #1
    Forum Contributor
    Join Date
    06-07-2018
    Location
    Newcastle Upon Tyne, England
    MS-Off Ver
    365
    Posts
    143

    Autofill chart columns based on label text

    I have a dashboard that I generate multiple times a day based on different datasets.

    Each time I am manually changing the fill colour of each column to make it easier to visualise what each column represents/belongs to.

    Attached is a desensitised document with an example of what I am trying to achieve, without having to manually change the fill each time a chart/report is generated.

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    09-03-2016
    Location
    Catania, Italy
    MS-Off Ver
    Excel 2019
    Posts
    164

    Re: Autofill chart columns based on label text

    HI
    Try this macro to associate with a button
    HI,
    Mario

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-07-2018
    Location
    Newcastle Upon Tyne, England
    MS-Off Ver
    365
    Posts
    143

    Re: Autofill chart columns based on label text

    Thanks Mario,

    That is extremely useful!

    I forgot to add to my comments, is it possible to have multiple charts and criteria within one sheet update on one single macro as well?

    Cheers
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    09-03-2016
    Location
    Catania, Italy
    MS-Off Ver
    Excel 2019
    Posts
    164

    Re: Autofill chart columns based on label text

    HI
    It is always better to insert macros in a standard Module and not in the Sheet Module.
    Try with the new macro that I associated with the button.
    Keep in mind that it "holds" for 2 charts.
    This is the code:
    Please Login or Register  to view this content.
    HI,
    Mario
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    06-07-2018
    Location
    Newcastle Upon Tyne, England
    MS-Off Ver
    365
    Posts
    143

    Re: Autofill chart columns based on label text

    Came across another challenge,

    When values are 0, the relevant rows are hidden in my tables so that they do not show up as 0 on the charts and instead, are ignored and not displayed.

    Do we know any amendments that can be used in the module to say: 'if the row is hidden, don't try to find what colour the chart object should be and just skip onto the next'.?

    I hope this makes sense as I am speaking in layman's terms as opposed to VBA.

    Thanks in advance!
    Attached Files Attached Files

+ 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. Excel chart move axis label but not columns
    By gideone in forum Excel General
    Replies: 6
    Last Post: 10-09-2017, 07:35 AM
  2. [SOLVED] Can a Chart Data Label Display Text?
    By Bobbbo in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 12-30-2016, 07:27 PM
  3. Bar Chart Colors based on Label Name!
    By troilii in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-30-2016, 08:36 PM
  4. [SOLVED] Changing all columns in a chart to display a series name label
    By moty.98 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 11-26-2012, 05:09 AM
  5. Change label text on a chart sheet
    By slide in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-05-2008, 11:30 AM
  6. text label in x-axis (scatter chart)
    By [email protected] in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-20-2006, 05:50 PM
  7. [SOLVED] Adding a certain text label in a excel chart
    By Tim in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-28-2005, 04:05 PM

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