code

One-click variable width column charts in Excel

The Poorhouse spends increasing amounts of his time with his head buried in the pile of small grey rectanges that is Microsoft Excel. This mind-boggling time is sometimes more than it really needs to be due to strangely lacking features in this program of a billion obscure functions. Take for example the variable width column chart (aka as the a start towards a matrix or Marimekko chart).

One use of such a beast is to represent 2 dimensions of data within a simple bar format - the height of the bars is the classic key dimension, and the width is another. Below is an example of this in practice. This made-up chart shows the amount of income generated by sales of cars by the paint colour of the car on the Y-axis, and the quantity of cars sold itself is reflected in the width of the bar. The wider the bar, the more cars were sold. Blue cars clearly generated the most income - and the wide width of the bar shows that this could be because the largest proportion of cars sold were blue (in the real world of course the chart would be appropriately captioned...). [edit: this isn't a great example from the point of view of chart clarity, see the comments for why - but the principle of how to make the chart stands!]

Now, this isn't a built-in Excel chart type sadly and it's a faff to do, so below is a macro to 1-click do it for you.

Syndicate content