Color Bar Representation

BillGulledge

New Member
Joined
Apr 23, 2012
Messages
10
I want to create a horizontal bar chart -- with one bar and stacked values, based on the values in a cell range. For example, I have entered numerical values in 3 cells -- A1 through A3 as follows:
A1 = 5
A2 = 3
A3 = 17


With this example, what I want to create is a one bar horizontal bar chart with three sections -- the leftmost section would be 5 units wide, the middle section would be 3 units wide and the right section would be 17 units wide. The total length of the bar would be 25 units.
If I change the values in A1 through A3, the sizes of the bar sections in the chart would change accordingly.

(The solution should accommodate a cell range with up to 10 cells, though only three are used in this example.)


To make it a little more useful to me, I need to be able to assign colors to each section of the bar chart -- for example the section representing A1 might be blue, the section representing A2 might be yellow, etc.

The easiest for me would be to color each of the cells containing the values for A1, A2, A3 with the desired color, and let the chart pick up the colors from the colors in A1:A3 but this may not be the easiest way to get the colors in the chart.
I am a fair had with Excel but don't do much with charting so this is beyond me.
Thanks
Bill
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,215,243
Messages
6,123,837
Members
449,129
Latest member
krishnamadison

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