bar graph question

A

anantathaker

Hello everyone,

I have data with 5 variables for 10 countries, and I have made
horizontal bar graph for each variable (so 5 graphs). This data i
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 eac
graph draws from its respective variable table. The same 10 countrie
are in each table, but they are not in the same order, because they ar
sorted from largest to smallest so that each horizontal bar graph i
sorted largest to smallest.

My question is, how can I make it so that each country has the sam
color bar in each of the 5 graphs? For example, the US has a red bar i
each graph, regardless of its position. Is there a way to do this? I'
no VBA expert, but is there some sort of conditional macro I can d
(any code someone has would be extremely helpful)? Is there an easie
way? Thanks!
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top