Conditional Formatting Chart

SSFG1992

New Member
Joined
Aug 9, 2018
Messages
2
Dear All,

I would like to know how can I conditional format this chart:

Objective: "Change the color of graph to “Red” or “Green” depending on Achievement %age in cell “B40 to G40” in tab “PDV”. Currently, the graph colors are different (random colors).
Change the color of graph to “Red” or “Green” depending on Achievement %age in cell “B40 to G40” in tab “PDV”. "Currently, the graph colors are different (random colors).

So, basically I want the graph colours to change in either Red or Green depending on a percentage level.

Would be thankful for your help.

* I could not figure out how to upload attachment *. I can email the file if you share email address or please let me know how to upload the file"

Thanks.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
To apply conditional formatting with a formula:
Select B40:G40 > Tab Home > Conditional Formatting > New Rule > "Use a formula to determine whihc cells to format" > '=B40>0.5' (change the formula to your needs) > Format > Choose the colour > OK

If you want to have different colours, you need to set a new rule with another formula.
 
Upvote 0
Excel does not support conditional formatting for charts. You could solve this issue by building a macro which would change the chart's colours based on a range's value. This would look like something along the lines of

Code:
IF 'condition' Then
With Chart1.FullseriesCollection(2).Format.Fill
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 176, 80)
        .Transparency = 0
        .Solid
End With
End IF

Try recording a macro while editing the chart to your preferences, then edit the macro accordingly.
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,174
Members
448,870
Latest member
max_pedreira

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top