Change color of data bar conditionally

certifiedk

New Member
Joined
May 18, 2012
Messages
2
Hi All,

I'm trying to change the color of the data bar based on the value. With conditionally formatting, I'm able to change the fill of the cell, but I'd like to change the color of the data bar instead.

Is this possible? Any help would be appreciated.

Certified K
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi cyrilbrd,

Thanks for the reply. Unfortunately neither of those solutions work.

I'm using data bars under the conditional formatting. Here's the context in which I'm trying to make them work.

Let's say you have a budget as follows:
(category - budget - amount spent)

A - B - C - D
Rent - $1000 - $1000 - <data bar here>
Groceries - $500 - $250 - <data bar here>
Gas - $200 - $10 - <data bar here>

I want data bars to do two things:
1. fill the D cells in color according to a formula (=B/C)
2. have the data bars themselves be color coded according the percentage (C>=D is red, C<D is yellow, C=0 is green)

I'm avoiding bar graphs because I want the color to stay within the cells so I'm looking for a solution specific to data bars.

Any help would be appreciated, VBA or otherwise.
 
Upvote 0
Hi,

I have the same problem, have you already found a solution?



Hi cyrilbrd,

Thanks for the reply. Unfortunately neither of those solutions work.

I'm using data bars under the conditional formatting. Here's the context in which I'm trying to make them work.

Let's say you have a budget as follows:
(category - budget - amount spent)

A - B - C - D
Rent - $1000 - $1000 - <data bar="" here="">
Groceries - $500 - $250 - <data bar="" here="">
Gas - $200 - $10 - <data bar="" here="">

I want data bars to do two things:
1. fill the D cells in color according to a formula (=B/C)
2. have the data bars themselves be color coded according the percentage (C>=D is red, C<d is="" yellow,="" c="0" green)

I'm avoiding bar graphs because I want the color to stay within the cells so I'm looking for a solution specific to data bars.

Any help would be appreciated, VBA or otherwise.

</d></data></data></data>
 
Upvote 0

Forum statistics

Threads
1,215,584
Messages
6,125,670
Members
449,248
Latest member
wayneho98

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