Sub topic 11
Changing what a chart plots with Select Data
This chapter assumes you can insert a chart from a selected range and that you know the terms series, category, and value. If a chart plots the wrong thing, you rarely need to rebuild it. The Select Data dialog lets you change the source range, add or remove series, and swap rows and columns.
Open the dialog
Click the chart, then go to Chart Design > Select Data. You can also right-click the chart and choose Select Data. The dialog has two panes:
- Legend Entries (Series) on the left lists each series the chart plots.
- Horizontal (Category) Axis Labels on the right lists the categories.
At the top, Chart data range holds the whole source range as one reference, such as =Sheet1!$A$1:$B$5.
Change the source range
Edit Chart data range to point at different cells. You can also click the range box and drag across new cells on the worksheet. Excel redraws the chart and re-reads which cells are series names, categories, and values.
Use the sample layout below. Region is the category column and Sales is the series.
Region Sales
North 120
South 95
East 140
West 80If you extend the range to include a new row, such as A1:B6, the new region appears as a new category.
Edit a single series
Select a series in the left pane and click Edit. The dialog asks for two references:
| Field | What it holds | Example |
|---|---|---|
| Series name | The cell with the series label | `=Sheet1!$B$1` |
| Series values | The cells that supply the plotted numbers | `=Sheet1!$B$2:$B$5` |
To add a series, click Add and fill in both fields. To drop one, select it and click Remove. Removing a series from the chart does not delete the cells in the worksheet.
To fix category labels, click Edit under Horizontal (Category) Axis Labels and select the cells that hold the labels, without the header cell.
Switch Row/Column
When a chart shows the wrong grouping, click Switch Row/Column. This swaps which dimension becomes the series and which becomes the categories. Suppose your data has regions down the side and quarters across the top. Before the switch, each quarter is a series and regions are categories. After the switch, each region is a series and quarters are categories.
For a line chart over time, you usually want the dates as categories. Use the switch if Excel put them in as series.
Hidden and empty cells
Excel skips hidden rows and columns by default. In the dialog, click Hidden and Empty Cells to plot hidden data. You can also choose whether empty cells show as gaps, zeros, or a line that connects across them.
Common errors
- A year column plotted as a series. Excel treats numeric columns as values. Change the year to text, or edit the series and move the column into the category labels.
- Header cell inside the category labels. The first label then appears as a bogus category. Select only the data cells.
- Series name shows as "Series1". The series name field is empty. Point it to the header cell.
- A pie chart shows only the first series. A pie plots a single series. Remove the others.
Exercise
A column chart plots Q1 to Q4 as four separate series, with regions along the horizontal axis. You want regions as series and quarters along the horizontal axis. Which control in Select Data do you use, and why is it better than rebuilding the chart?
Show answer
Use Switch Row/Column. It swaps the series and category roles without changing the source range, so the formatting you already applied stays on the chart.