Sub topic 4
Inserting a chart from a selected range
This chapter assumes you can navigate workbooks and worksheets, select ranges, and find the ribbon tabs. It also assumes your data is already laid out with a header row, one category column, and one or more value columns, as covered in the earlier chapters on layout and on series and categories.
The basic workflow
Inserting a chart takes three steps: select the range, pick a chart type on the Insert tab, and check what Excel plotted. The selection matters most, because Excel decides what is a category and what is a series from the shape of the cells you select.
Use this sample range in A1:B5:
Region Sales
North 120
South 95
East 140
West 80- Click cell A1, or any cell inside the range. Excel expands the selection to the surrounding block of data. To be explicit, drag from A1 to B5.
- Open the Insert tab. In the Charts group, click Insert Column or Bar Chart.
- Under 2-D Column, choose Clustered Column.
Excel places a chart on the sheet, using the header "Sales" as the series name and the Region values as the category labels.
What Excel decides for you
When you insert a chart, Excel applies these rules to your selection:
| Selection feature | Excel's interpretation |
|---|---|
| Text in the first column | Category labels |
| Numbers in other columns | Values, one series per column |
| Text in the first row | Series names |
| Blank top-left cell | Header row and category column both recognized |
The chart then appears as an embedded object. It floats over the cells and can be dragged, resized, or moved to its own sheet with Chart Design > Move Chart.
Common errors
- A numeric column is plotted as categories. If your first column holds numbers such as years, Excel may treat it as a series instead of as labels. Fix this on the Chart Design tab with Select Data, which a later chapter covers. You can also change the header cell A1 to text.
- Empty rows or columns split the data. A blank row inside the range ends the block that Excel expands to when you click one cell. Select the whole range by dragging, or remove the gap.
- Totals are plotted with the data. If your selection includes a Total row, the total appears as a very tall column. Select only the rows you want to compare.
- Rows and columns are swapped. With more columns than rows, Excel may plot each row as a series. Use Chart Design > Switch Row/Column to flip the orientation.
Selecting non-adjacent ranges
You can chart columns that are not next to each other. Select the first range, hold Ctrl (Cmd on Mac), and select the second. For example, select A1:A5, then hold Ctrl and select C1:C5. Both selections must have the same number of rows, and the first column selected supplies the categories.
Inserting a chart with a keyboard shortcut
Select the range and press Alt+F1 to insert a default chart on the current sheet. Press F11 to create it on a new chart sheet. Both use the default chart type, which is clustered column unless you changed it.
Exercise
You select A1:B5, where A1:A5 holds a header and region names and B1:B5 holds a header and sales figures. After inserting a chart, the region names do not appear as labels and the chart shows two series. What is the most likely cause, and how do you fix it?
Show answer
Excel treated the first column as numeric data rather than categories, which usually happens when the first column contains numbers, or when the top-left header cell is not text. Fix it by opening Chart Design > Select Data, removing the unwanted series, and setting the Horizontal (Category) Axis Labels to A2:A5. You can also make sure the first column holds text.