Sub topic 5
Building a column chart
This chapter assumes you can navigate a workbook, select a range, and use the ribbon. It also assumes you know how series and categories work, and how to lay out data with a header row. A column chart compares values across categories. Each category gets a vertical bar, and the bar's height shows the value.
Start from the data layout
Use a range with one category column and one value column. The header row names the series.
Region Sales
North 120
South 95
East 140
West 80Excel reads the text column (Region) as categories. It reads the numeric column (Sales) as a series. The header "Sales" becomes the series name and appears in the legend.
Insert the chart
- Click any cell inside the range, or select A1:B5.
- Open the Insert tab.
- In the Charts group, choose Insert Column or Bar Chart.
- Under 2-D Column, pick Clustered Column.
Excel places the chart on the sheet and shows the Chart Design and Format tabs while the chart is selected.
Clustered, stacked, and 100% stacked
The Insert Column or Bar Chart menu offers three column subtypes. They matter most when you have more than one series.
| Subtype | What it shows | Use it when |
|---|---|---|
| Clustered | Series side by side within each category | You compare series directly |
| Stacked | Series piled into one bar per category | The total matters as well as the parts |
| 100% Stacked | Each bar scaled to 100% | You compare proportions, not totals |
With a single series, as in this example, clustered is the right choice. The other two add nothing.
Edit the title and elements
A new chart usually has a title that reads "Chart Title" or repeats the series name. Click it and type a descriptive one, such as "Sales by Region".
To add or remove elements, select the chart and click the Chart Elements button (the plus sign) at its upper right. For a one-series chart, consider these changes:
- Turn on Data Labels so readers see exact values without reading the axis.
- Turn off Legend. With one series it repeats the title.
- Keep Axis Titles only if the units are not obvious.
Check the result
Look at the chart before you share it.
- Each bar should carry a category name on the horizontal axis. If you see 1, 2, 3, 4 instead, Excel did not treat your first column as categories. Use Select Data to fix it.
- The vertical axis should start at zero. Bar height is the signal in a column chart, so a truncated axis exaggerates differences.
- Sort the rows first if you want ranked bars. The chart follows the order of the worksheet.
Create the same chart with VBA
A macro can build the chart from the same range. This is useful when you repeat the task often.
Sub CreateColumnChart()
Dim co As ChartObject
Set co = ActiveSheet.ChartObjects.Add(Left:=100, Top:=50, Width:=400, Height:=250)
With co.Chart
.SetSourceData Source:=ActiveSheet.Range("A1:B5")
.ChartType = xlColumnClustered
.HasTitle = True
.ChartTitle.Text = "Sales by Region"
End With
End SubChartObjects.Add creates a frame on the sheet. SetSourceData supplies the range, and ChartType = xlColumnClustered selects the subtype.
Exercise
You select A1:B5 and insert a clustered column chart. The horizontal axis shows 1, 2, 3, 4 instead of region names. What does this tell you about how Excel read the range, and where do you fix it?
Show answer
Excel treated the Region column as data instead of as category labels. Open Select Data from the Chart Design tab, then use Edit under Horizontal (Category) Axis Labels and select A2:A5. Removing a stray Region series from the left-hand list may also be necessary.