I have a 3D stacked Bar chart where each day I sort the bars in descending order based on the sum of the two series. I need one of the catagories to ALWAYS remain the same blue color however whenever I sort the catagory color often changes. It seems that the ActiveChart.SeriesCollection(1).Points(x) is always tied to a specific number. I want to make it dependant on the catagory name. Please refre to attached.
Format color of a 3D barchart bar based on catagory name
-
-
-
Re: Format color of a 3D barchart bar based on catagory name
Excel 2010
Format chart points according to category names.
With pictures instead of colors.
Animated.
With macro.
http://c3017412.r12.cf0.rackcdn.com/02_23_11.xlsm
If you get *.zip, don't unzip, just rename *.xlsm
http://www.mediafire.com/file/i9cemeqdz76zsck/02_23_11.pdf -
Re: Format color of a 3D barchart bar based on catagory name
Wow you really went all out on this one - thanks. If possible I'd really like to keep it simple with solid fill colors rather than pictures. I'd also like to take advantage of the MSO accent colors, eg. Any ideas? Thanks again
Code
Display MoreActiveChart.SeriesCollection(5).Select With Selection.Format.Fill .Visible = msoTrue .ForeColor.ObjectThemeColor = msoThemeColorAccent1 .ForeColor.TintAndShade = 0 .ForeColor.Brightness = 0 .Solid End With With Selection.Format.Fill .Visible = msoTrue .ForeColor.ObjectThemeColor = msoThemeColorAccent3 .ForeColor.TintAndShade = 0 .ForeColor.Brightness = 0 .Transparency = 0 .Solid
-
Re: Format color of a 3D barchart bar based on catagory name
Hello Danielle,
Welcome to Ozgrid. While we are glad to have you on-board, please take time to read the forum rules.
Per the Forum Rules, VBA code must be wrapped in code tags, which you omitted.
I've added the tags for you this time; please be sure to use them in future posts when needed.See the link in my signature for more information on how to use tags.
[COLOR="navy"]How to use code tags[/COLOR]
[noparse][/noparse]
Thanks.
-
Re: Format color of a 3D barchart bar based on catagory name
Excel 2010 Chart
Here is another example of accent coloring and labeling points.
Anything simpler is just no fun.
http://c718892.r92.cf0.rackcdn.com/01_11_10.xlsm -
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!