+ Reply to Thread
Results 1 to 10 of 10

Automatically Colour Individual Bars in Bar Chart

  1. #1
    Registered User
    Join Date
    12-13-2019
    Location
    London
    MS-Off Ver
    2016
    Posts
    16

    Automatically Colour Individual Bars in Bar Chart

    Hi All

    Wasn't sure where to put this as it could probably fit into a number of categories. I am producing a lot of graphs at the moment and need to highlight 2 bars out of 24 in different colours. Each week the 2 bars I need to highlight change. Is there a way to do this automatically as it's very time consuming doing it for every chart I have, every week, manually? Conditional formatting isn't available on bar charts. Is there a way to set up a macro or formula to do so? Ideally I'd like to change the text in a cell to match the name of the bar I want to highlight and it automatically highlight in every chart.


    Thanks in advance,
    Joe

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Automatically Colour Individual Bars in Bar Chart

    Welcome to the forum.

    Moved to the Charting & Pivots section. Please note that duplicate posts are not allowed, so please don't post the same query in multiple categories. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    12-13-2019
    Location
    London
    MS-Off Ver
    2016
    Posts
    16

    Re: Automatically Colour Individual Bars in Bar Chart

    Hi Ali,

    Thank you for that. I didn't publish it in multiple categories but thanks for the heads up.

    Joe

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Automatically Colour Individual Bars in Bar Chart

    I know - I was just advising you because you said this: "... it could probably fit into a number of categories". Just saving you (and me!) the hassle of thread closures.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Automatically Colour Individual Bars in Bar Chart

    Yet now you have, despite being explicitly advised NOT to do so!!!

    If you would like the thread moving to the VBA section, you need to ask. You may NOT have more than ONE thread per issue here.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Automatically Colour Individual Bars in Bar Chart

    John Peltier gives examples of Conditional Formatting of Charts here:

    http://peltiertech.com/conditional-f...-excel-charts/

    He shows how you can achieve this without VBA.

    Hope this helps.

    Pete

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

    Re: Automatically Colour Individual Bars in Bar Chart

    You can do it with additional series or vba.

    There is an example of both in the attached.

    The vba uses worksheet change event to update the chart.

    Use the drop down list to choose the 2 teams to hilight
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Automatically Colour Individual Bars in Bar Chart

    Nice one, Andy. I checked your site first, but couldn't see anything similar that I could easily link to.

    Pete

  9. #9
    Registered User
    Join Date
    12-13-2019
    Location
    London
    MS-Off Ver
    2016
    Posts
    16

    Re: Automatically Colour Individual Bars in Bar Chart

    Thanks Guys. That has really helped and solved it. Thank you

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Automatically Colour Individual Bars in Bar Chart

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. How to vary the width of individual bars in a bar chart
    By FrankParisi in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-23-2016, 07:46 AM
  2. [SOLVED] Standard Deviation Error Bars for Individual Columns of a Bar Chart
    By Chris_SS in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-08-2014, 04:35 AM
  3. [SOLVED] Colour Bars in a bar chart dependent on the result
    By forrestgump1980 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-03-2014, 07:20 AM
  4. how to colour different bars in bar chart
    By Deanomcbeano in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-20-2014, 12:15 PM
  5. Individual formatting of bars in a bar chart
    By TomaszTarczynski in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2011, 06:49 AM
  6. Replies: 1
    Last Post: 07-04-2011, 05:23 PM
  7. Excel should let me caption individual bars in a stacked chart
    By Matt Turnbull in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-14-2006, 10:00 PM

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