+ Reply to Thread
Results 1 to 1 of 1

VBA That Colors Bars in a Bar Chart Based on DataPoint Name

  1. #1
    Registered User
    Join Date
    07-23-2019
    Location
    Minnesota
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    2

    VBA That Colors Bars in a Bar Chart Based on DataPoint Name

    I have a bar chart that fluctuates depending on how many datapoint values I have. If there is a datapoint that doesn't have a value, I have a macro that hides that row with the blank values, which then condenses my graph. That way my graph can have 2 to 15 datapoint values. The issue I am having is I want datapoint#1 to be a gradient fill that has 3 stops (0%, 50%, 100%, with no angle) colored black, datapoint#2 to be orange, datapoint#3 to be green, and so on. If I pre-set the bar colors 1-15, and I don't have datapoint#2, then datapoint#3 will be colored with datapoint#2's color (orange instead of green). Wondering if there is a way to write a macro that will color the bars based on the datapoint name so the colors will remain stagnant no matter how many values I have in the graph. I have attached the spreadsheet as an example.
    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. Gantt Chart - Different colors on the bars
    By davidstokes in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 08-28-2018, 08:47 PM
  2. Changing cells and column chart colors based on cell colors
    By HDeuce in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-03-2016, 11:43 AM
  3. Excel Bar Chart not displaying the datapoint markers
    By Jamiu in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 05-11-2014, 04:51 AM
  4. color datapoint in chart based on vba macro
    By nqh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-15-2014, 08:44 PM
  5. Beating the 32,000 datapoint chart limit
    By sweep in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2009, 11:57 AM
  6. Complex Chart:Need to have COLORS of BARS stay with designated data when I SORT
    By willandr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-04-2007, 05:30 PM
  7. [SOLVED] assign permanent colors to bars/values in a pivot chart
    By Rose73 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-01-2006, 01:00 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