Simple (?) charting question

Copernicus

New Member
Joined
Jun 12, 2009
Messages
26
Brain dead this morning!

I want to create a chart that is a series of horizontal bars. The axis label is years. Each bar changes color from Green to Yellow to Red in a specified year based on data in a table. I tried a table with years across the top and data values of 1, 2, 3 in rows, with data for each scenario in rows. I also tried transposing to columns. I cant find a bar chart format that works for either table.

Thanks!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Well I used a helper range to sum the count of 1, 2 & 3's then plotted that.

Input data

Excel 2007
ABCD
1YearD1D2D3
22016111
32017111
42018111
52019111
62020111
72021111
82022211
92023221
102024221
112025321
122026331
132027331
142028331
152029331
162030331
172031331
182032331
192033331
202034331
212035331
222036331
232037331
242038331

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet7



Helper area

Excel 2007
FGHI
1123
2D16314
3D27313
4D32300

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet7

Worksheet Formulas
CellFormula
G2=COUNTIF($B$2:$B$24, G$1)
H2=COUNTIF($B$2:$B$24, H$1)
I2=COUNTIF($B$2:$B$24, I$1)
G3=COUNTIF($C$2:$C$24, G$1)
H3=COUNTIF($C$2:$C$24, H$1)
I3=COUNTIF($C$2:$C$24, I$1)
G4=COUNTIF($D$2:$D$24, G$1)
H4=COUNTIF($D$2:$D$24, H$1)
I4=COUNTIF($D$2:$D$24, I$1)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Thanks...other than labeling the horizontal axis with the year (without screwing everything up in the chart!) I got that to work.
 
Upvote 0
Cool, that's good. We're getting there :biggrin:

Last time I did a lot of chart work was a while back so quite rusty, I'll have a go at trying to get the axis labels to work. I can think of a quick cheat to do it, would that be satisfactory or are you needing to somehow manipulate this so it's dynamic?
 
Upvote 0
No, the years will be fixed not dynamic. I could paste in an image of them but getting the years to match the data would be a pita.
 
Upvote 0
Like so?

15noard.png
 
Upvote 0
If you also plot 2016 as a value, then set the axis start point to 2016, max point to 2038 then set major gridlines to every 1 you get it to

Data

Excel 2007
KLMN
620166314
720167313
820162300

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet7

Outcome

5plyyw.png
 
Last edited:
Upvote 0
Have you managed to follow what I've been doing or do you need further instructions?
 
Upvote 0

Forum statistics

Threads
1,215,256
Messages
6,123,914
Members
449,132
Latest member
Rosie14

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