VBA to Conditionally Format a Chart

ChrisMore

Member
Local time
Today, 04:38
Joined
Jan 28, 2020
Messages
193
Hi,

Please can I have some help with VBA to dynamically change the color of a bar chart based on the value of "SumOfPercentage". It's frustrating that Access doesn't have a built in conditional formatting option to do this.

If value is under 50 - green
If value is between 50 and 90 - orange
If value is over 90 - red

I'm sure this is possible to achieve but haven't been able to find any help when researching this (if the answer is already available on a previous thread then I apologize). If there is an alternative method without needing code then I'd be happy to learn it.

Thanks for your help in advance.
Chris
1752666278404.png
 
I have seen where separate columns are added for each range so in your case there would be three extra columns with either the appropriate value or 0. Then create a stacked bar chart and set the colors as you desire.
 
I have seen where separate columns are added for each range so in your case there would be three extra columns with either the appropriate value or 0. Then create a stacked bar chart and set the colors as you desire.
Thanks for the suggestion. You say "set the colors as you desire" so do you mean coloring the chart bars manually? I require the chart colors to dynamically update as the value of "SumOfPercentage" changes for each category.
 

Users who are viewing this thread

Back
Top Bottom