JimFl78
11-22-2007, 09:16 AM
Hi, Apologies for the multiple threads - not sure how I did that and will try to delete.
I have been able to generate a simple barchart from my results Stats worksheet with the following code
Charts.Add
ActiveChart.SetSourceData Source:=Sheets("Stats").Range("A1:C2")
ActiveChart.Location Where:=xlLocationAsObject, Name:="BARCHART"
My Stats worksheet looks like this
SurveyName Survey1 Survey2 Survey3
Survey% 90% 75% 60%
How feasible is it to generate an excel chart on the fly from a series of data like this but I need to remove the numbers (ie %) from the x axis ? to be honest it doesnt even have to be generated on the fly - it could be set up.
I would also like to colour each of the bars. I could add the code to the generation of the worksheet so that it includes a colour reference.
Essentially what I am trying to achieve is to replace the numbers with like a colour coded scale:
for example
0-50 RED
50-70 YELLOW
70-90 ORANGE
90+ GREEN
Could I use a graphical element to replace the numbers?
Please let me know your thoughts on this and whether it can be done?
I have been able to generate a simple barchart from my results Stats worksheet with the following code
Charts.Add
ActiveChart.SetSourceData Source:=Sheets("Stats").Range("A1:C2")
ActiveChart.Location Where:=xlLocationAsObject, Name:="BARCHART"
My Stats worksheet looks like this
SurveyName Survey1 Survey2 Survey3
Survey% 90% 75% 60%
How feasible is it to generate an excel chart on the fly from a series of data like this but I need to remove the numbers (ie %) from the x axis ? to be honest it doesnt even have to be generated on the fly - it could be set up.
I would also like to colour each of the bars. I could add the code to the generation of the worksheet so that it includes a colour reference.
Essentially what I am trying to achieve is to replace the numbers with like a colour coded scale:
for example
0-50 RED
50-70 YELLOW
70-90 ORANGE
90+ GREEN
Could I use a graphical element to replace the numbers?
Please let me know your thoughts on this and whether it can be done?