Sub topic 5
Controlling the data range, headers, and series
This chapter assumes you can insert a chart and open the chart editor. You should know that a range such as A1:D13 means a block of cells. It also covers how Google Sheets turns a block of cells into a chart. Most "my chart looks wrong" problems come from the data range, header, or series settings, not from formatting.
How Sheets reads a range
When you insert a chart, Sheets guesses how to read your selection. It makes three decisions:
- Which orientation to use. It decides whether each column or each row is a series. A series is one set of values drawn as one line, one set of bars, or one set of columns.
- Whether the first row or column is a header or a label. A header names a series. A label names each point on the horizontal axis, such as a month or product.
- Which column or row supplies the X-axis. This is the category axis, or the horizontal axis for most chart types.
Each decision shows up in the Setup tab of the chart editor. You can override every guess.
The sample data
The examples use this table in A1:D5:
| Month | North | South | West |
|---|---|---|---|
| Jan | 120 | 90 | 60 |
| Feb | 135 | 95 | 72 |
| Mar | 150 | 110 | 80 |
| Apr | 160 | 130 | 95 |
If you select A1:D5 and insert a chart, Sheets usually does the following:
- It treats row 1 as headers.
- It uses column A as the X-axis labels.
- It draws North, South, and West as three series.
The Data range box
In Setup, the Data range box shows the current range. You can edit it in three ways:
- Type into the box. For example, change
A1:D5toA1:C5to drop the West series. - Click the grid icon. It opens a "Select a data range" dialog. Drag across the cells you want. You can also click Add another range there.
- Reselect the cells first. Highlight the data before inserting the chart. This is the quickest way to get a correct start.
Non-contiguous ranges
You can chart columns that are not next to each other. Separate the ranges with commas:
A1:A5, C1:C5This plots the Month labels against the South column only. The ranges must line up in length, with the same number of rows in each. The first range supplies the labels, so put it first.
You can also Ctrl-click (Cmd-click on Mac) separate blocks before you insert the chart. Sheets writes the same comma-separated list for you.
Ranges that grow
A range such as A1:D5 is fixed. If you add a row 6 below it, the chart ignores that row. If you insert a row inside the range, the range expands. You have two ways to make charts follow new data:
- Use whole columns, for example
A:D. New rows are picked up automatically. Sheets treats the header row as usual. - Include a spare blank area. For example, use
A1:D100. Blank rows may appear as empty categories on the axis, so check the chart before you rely on this.
Whole-column ranges have a cost. Any stray value further down the sheet, such as a note or a total, becomes part of the chart.
Headers and labels
Below the data range, the Setup tab has checkboxes:
| Option | What it does |
|---|---|
| **Switch rows / columns** | Swaps which direction a series runs. |
| **Use row 1 as headers** | Treats the first row as series names, not data. |
| **Use column A as labels** | Treats the first column as X-axis labels, not a series. |
| **Aggregate** | Combines rows with the same label, using a function such as sum. |
The row and column numbers in the option names change with your range. If your range starts at row 3, the option reads "Use row 3 as headers."
The usual problems are as follows:
- Months or years drawn as a series. If the label column holds numbers, such as 2023 and 2024, Sheets may treat it as data. A line then appears for "Year." Tick Use column A as labels and remove the extra series.
- The header is plotted as a data point. The first row holds text, but Sheets did not detect it. Tick Use row 1 as headers.
- Series are named "Series 1", "Series 2". There is no header row in the range. Add one, or rename the series by clicking it and editing the label.
When you switch rows and columns, the labels option changes its wording. It then refers to the first row instead of the first column.
Working with series
Under Series in Setup, each series appears as a row with a three-dot menu.
- Add series appends a new range as a series. You can type or select a range, such as
D1:D5. - Edit a series' range. Click the series and change its cell range. This is useful when one series should come from another sheet.
- Remove deletes the series from the chart. It does not delete the cells.
- Reorder by dragging. The order sets the legend order and the stacking order in stacked charts.
The X-axis field has its own range. If the labels are wrong, check this field first. You can point it at any single column or row, including one far from the data.
Using another sheet
A range can refer to a different tab. Include the sheet name in quotes if it has spaces:
'Sales 2026'!A1:D5The chart then lives on one tab and reads data from another. This is common for dashboards.
Aggregation
If your data has repeated labels, such as many rows for "North", a chart plots each row separately. Tick Aggregate to combine them. The editor then shows an aggregation menu next to each series. Typical choices are sum, average, count, min, and max.
Aggregation works for simple summaries. For more control, or for filters, build a summary table with QUERY and chart that table instead. A later chapter covers it.
Empty cells, text, and hidden rows
- Empty cells show as gaps in a line chart. Look for a setting in Customize that controls how blanks are plotted, if your editor version offers it.
- Text in a numeric column is plotted as zero or skipped, depending on the chart type. Check for numbers stored as text, which usually sit left-aligned in the cell.
- Hidden rows and columns are normally left out of the chart. This is how filters can drive a chart. The setup of that is covered in a later chapter.
A worked fix
A teammate sends you a chart with the following problems:
- The legend shows "Month", "North", "South", "West". Month should not be a series.
- The X-axis reads 1, 2, 3, 4.
The cause is that Sheets did not detect column A as labels. To fix it:
- Open the chart editor and go to Setup.
- Confirm the Data range is
A1:D5. - Tick Use column A as labels.
- Tick Use row 1 as headers if it is not already on.
- Check that the Series list now holds only North, South, and West.
The X-axis now shows Jan to Apr, and the legend shows three entries.
Exercise
A chart has the data range A1:D5. The first column holds the years 2021 to 2024 as numbers, and Sheets plots "Year" as a fourth line. Name two changes in the chart editor that fix this, and say which setting to check if the X-axis then shows 1, 2, 3, 4.
Show answer
Tick "Use column A as labels", or remove the Year series from the Series list. Then set the X-axis range to A2:A5 or A1:A5 if the axis still shows 1 to 4. The setting to check is the X-axis field, together with "Use column A as labels", because the axis shows counting numbers when no label column is assigned.