Hi EE,
I have a set of data that I would like to be represented in a bar chart, via the executing of a macro. Right now I have 6 different variables, but let´s talk only of 2 of them, so later, once the macro is written, I would follow it in order to get the rest of the variables done.
Starting on row 2, on column A I have the description or name of the variable. On column B I have the value of the corresponding variable, expressed as percentage with 2 decimals.
Example for the first variable:
The number found on B2 must be evaluated according to the following:
B2 value range Grade assigned in % Color for bar in chart
less than 0.9350 0 red
0.9350 0.9395 0 20.0 red
0.9396 0.9500 20.1 50.0 orange
0.9501 0.9557 50.1 65.0 yellow
0.9558 0.9589 65.1 85.0 light green
0.9590 0.9650 85.1 100.0 dark green
more than 0.9650 100.0 dark green
Then, according to the grade obtained, and the corresponding color, I would like the representation in the bar type chart, which on the abscissa axis would have the scale 0 to 120 % and on the ordinate axis the scale would depend on the amount of different data that is being analyzed. In this case we have 2 variables to chart.
Examples for the interpolation:
if the value on B2 is 0.925 then the grade is 0.00% and the bar is red.
if the value on B2 is 0.937 then the grade is 8.89% and the bar is red.
if the value on B2 is 0.942 then the grade is 27.0% and the bar is orange.
if the value on B2 is 0.953 then the grade is 57.82% and the bar is yellow.
if the value on B2 is 0.957 then the grade is 72.80% and the bar is light green.
if the value on B2 is 0.960 then the grade is 87.58% and the bar is dark green.
if the value on B2 is 0.970 then the grade is 100.0% and the bar is dark green.
About the graph: the bar should be proportional to the grade assigned, and also the value of the grade should be shown on it.
For the second variable:
The number found on B3 must be evaluated according to the following:
B3 value range Grade assigned in % Color for bar in chart
more than 5.00 0.0 red
5.00 4.70 0.0 20.0 red
4.69 4.00 20.1 50.0 orange
3.99 3.60 50.1 65.0 yellow
3.59 3.40 65.1 85.0 light green
3.39 3.00 85.1 100.0 dark green
less than 3.00 100.0 dark green
Examples of interpolation:
if the value on B3 is 6.0 then the grade is 0.00% and the bar is red.
if the value on B3 is 4.8 then the grade is 13.33% and the bar is red.
if the value on B3 is 4.2 then the grade is 41.33% and the bar is orange.
if the value on B3 is 3.7 then the grade is 61.18% and the bar is yellow.
if the value on B3 is 3.5 then the grade is 74.53% and the bar is light green.
if the value on B3 is 3.1 then the grade is 96.18% and the bar is dark green.
if the value on B3 is 2.8 then the grade is 100.0% and the bar is dark green.
Next, according to the grade and color obtained, we have to represent this in the bar type graph already mentioned above.
I hope having explained all items involved, and also have given enough examples.
Thank you in advance.
Carlos