Conditional Format Charts

cterjesen

Board Regular
Joined
Jun 23, 2003
Messages
119
I am working with a bubble graph. I want to conditionally format the color of each bubble depending on a specific criteria that is not related to the three criteria that makes up the graph. Is this possible?

Can you copy the conditional format of the source data to the data point that represents the source data in the chart?

Thanks!
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I am actually trying to do the same thing with bar graphs. Depending on the value returned, the bar should be one of three colors (red if the value is less than 90, yellow if the value is between 90 and 95, and green if the value is greater than 95.). I have done conditional formatting on the cells where my formulas are so they come out the correct colors, I just don't know how to conditionally fomat the graph. I am currently trying to use macros to accomplish this, but now can't figure out how to run a macro in a function (the IF function, in particular.). Any assistance would be greatly appreciated. Thanks.
 
Upvote 0
I've looked at Jon's site and I can't figure out how he's changing the colors depending on the value. In my case, I have a separate formula that places a value beside each data point source line:

if the value is 2 -> I want the data point green
if the value is 1 -> I want the data point yellow
if the value is 0 -> I want the data point red

These are the only possible values this formula will return.
 
Upvote 0
Juan,

Thanks for your quick response. I've posted a sample below.

Branch Units Fixed Cost Net Revenue Conditional Formula

Branch 1 40 1337 4864 1 <--- yellow
Branch 2 50 856 3495 2 <--- green
Branch 3 14 1275 2602 0 <--- red

The bubble graph is based on the Units, Fixed Cost, and Net Revenue columns. Bubble size is determined by Units. Fixed Cost is the x-axis. Net Revenue is the Y-axis. The graph itself is broken into quadrants determined by goals.

The goal is 1200 for Fixed Cost. The goal is 3400 for Net Revenue. I've drawn lines on the chart to mark these goals. Thus is a branch is less than 1200 in Fixed Cost and greater than 3400 in Net Revenue (as is the case for Branch 2), I would like that data point to be green. The Conditional Formula result shown above just looks to see if Fixed Cost is below 1200 and Net Revenue is above 3400. The branch gets 1 point for each goal it meets. If it meets one goal only, it should be yellow. If it meets both goals, it should be green. If it meets neither goal, it should be red.

I have a sample chart I could send you, but I'm not sure how to post a file to this site.

Thanks again for all of your help.
 
Upvote 0
Ok, the following is based on the methodology that Jon explains on that page I linked.

Let's assume the following data, based on what you posted:
Libro2
ABCDE
21
22BranchUnitsFixedCostNetRevenueConditionalFormula
23Branch140133748641
24Branch25085634952
25Branch314127526020
Sheet1


Now, I apply some formulas, so I end up with this:
Libro2
ABCDEFGH
21redyellowgreen
22BranchUnitsFixedCostNetRevenueConditionalFormula012
23Branch140133748641#N/A4864#N/A
24Branch25085634952#N/A#N/A3495
25Branch3141275260202602#N/A#N/A
Sheet1


The formula in F23 is

=IF($E23=F$22,$D23,NA())

which is dragged down and across

Finally, I create a bubble chart that has three series. Its formulas are:

Serie 1:

=SERIES(Sheet1!$F$22,Sheet1!$C$23:$C$25,Sheet1!$F$23:$F$25,1,Sheet1!$B$23:$B$25)
Serie 2:

=SERIES(Sheet1!$G$22,Sheet1!$C$23:$C$25,Sheet1!$G$23:$G$25,2,Sheet1!$B$23:$B$25)
Serie 3:

=SERIES(Sheet1!$H$22,Sheet1!$C$23:$C$25,Sheet1!$H$23:$H$25,3,Sheet1!$B$23:$B$25)

Serie 1 is formatted with a Red background, Serie 2 with a Yellow background and Serie 3 with a green background.

You can remove the legend to avoid "issues", I just named the series for clarity.
 
Upvote 0
Juan,

You're a genius! You don't know how much time this is going to save me.

Thanks so much!

Chris
 
Upvote 0

Forum statistics

Threads
1,215,728
Messages
6,126,523
Members
449,316
Latest member
sravya

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