Home |
Search |
Today's Posts |
#1
|
|||
|
|||
bar graph question
Hello everyone, I have data with 5 variables for 10 countries, and I have made a horizontal bar graph for each variable (so 5 graphs). This data is linked to another page, and it is divided by variable within the sheet. For example, the format is: Country Variable 1 US ### China ### India ### UK ### Country Variable 2 US ### China ### India ### UK ### There is a macro that sorts each of this mini-tables, and then each graph draws from its respective variable table. The same 10 countries are in each table, but they are not in the same order, because they are sorted from largest to smallest so that each horizontal bar graph is sorted largest to smallest. My question is, how can I make it so that each country has the same color bar in each of the 5 graphs? For example, the US has a red bar in each graph, regardless of its position. Is there a way to do this? I'm no VBA expert, but is there some sort of conditional macro I can do (any code someone has would be extremely helpful)? Is there an easier way? Thanks!! -- anantathaker ------------------------------------------------------------------------ anantathaker's Profile: http://www.excelforum.com/member.php...o&userid=18133 View this thread: http://www.excelforum.com/showthread...hreadid=380066 |
#2
|
|||
|
|||
one way to do it is to use a stacked bar with a different data set for each
country with Zeros for the other countries and the value for the specific country of interest when you set up the graph just set the color of the bar for each catagory as wanted. "anantathaker" wrote: Hello everyone, I have data with 5 variables for 10 countries, and I have made a horizontal bar graph for each variable (so 5 graphs). This data is linked to another page, and it is divided by variable within the sheet. For example, the format is: Country Variable 1 US ### China ### India ### UK ### Country Variable 2 US ### China ### India ### UK ### There is a macro that sorts each of this mini-tables, and then each graph draws from its respective variable table. The same 10 countries are in each table, but they are not in the same order, because they are sorted from largest to smallest so that each horizontal bar graph is sorted largest to smallest. My question is, how can I make it so that each country has the same color bar in each of the 5 graphs? For example, the US has a red bar in each graph, regardless of its position. Is there a way to do this? I'm no VBA expert, but is there some sort of conditional macro I can do (any code someone has would be extremely helpful)? Is there an easier way? Thanks!! -- anantathaker ------------------------------------------------------------------------ anantathaker's Profile: http://www.excelforum.com/member.php...o&userid=18133 View this thread: http://www.excelforum.com/showthread...hreadid=380066 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I create a combination graph with stackedColumns+lineGraph | Charts and Charting in Excel | |||
Graph from a PIVOT table: update not working. Please Help! | Excel Discussion (Misc queries) | |||
Graph Help- 12 month graph, but only want months that have passed | Charts and Charting in Excel | |||
Line Graph Data Recognition | Charts and Charting in Excel | |||
Graph Axes | Excel Discussion (Misc queries) |