O'Reilly logo

Excel Hacks by Raina Hawley, David Hawley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #56. Create a Column Chart with Variable Widths and Heights

Wouldn't it be nice to create a column chart whose columns can vary in width and height? Then, as you plot your data into the columns, the columns' width and height cleverly adjust themselves simultaneously.

Excel doesn't provide this feature directly, but by hacking an XY scatter chart you can create a very effective variable width column chart. XY scatter charts are used to compare values; therefore, they provide a perfect base on which to start creating a variable width column chart.

Figure 5-24 shows a variable width column chart that charts the percent share versus cost for the following expenses: gas, electricity, water, food, travel, and other. The X axis (the axis along the bottom of the chart) shows the percentages (%), while the Y axis (the axis on the lefthand side) shows the cost ($).

XY scatter chart set up from range D2:E8

Figure 5-24. XY scatter chart set up from range D2:E8

To create this chart, set up some data such as that in Figure 5-24 and, using the Chart Wizard, highlight the range D2:E8. Then, in Step 1 of the Chart Wizard, select the XY Scatter Chart option. Accept the default scatter chart, which shows only points, and click Next to move to Step 2 of the Wizard. Ensure that Columns is selected. Click the Next button to move to Step 3 of the Wizard, and under Value (Y) Axis, type Cost ($). Click the Next button and ensure that the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required