In Google Sheets, a chart’s data range is the cell range that supplies its labels and values. To set or change it, select the chart, open Edit chart, then use Setup > Data range in the Chart editor; you can type a range such as A1:B10 or select cells on the sheet.
What a chart data range controls
The data range tells Sheets which cells a chart should read. Those cells can provide category labels, series names, and the numbers that become bars, lines, slices, or points. Changing the range can therefore change not only the amount of data shown, but also how Sheets interprets rows and columns.
For example, suppose cells A1:B4 contain a header row, three months in column A, and sales totals in column B. Using A1:B4 includes both the month labels and values. Using only B2:B4 supplies the numbers but leaves the chart without the month names. If the chart has an unexpected legend, axis, or series, the selected range and the header and label settings are good places to start checking.
A data range is not the same thing as a chart’s appearance. It does not set colors, titles, gridlines, or fonts. Those options are in the Chart editor’s Customize tab. The range supplies the underlying cells; the chart settings determine how the data is displayed.
How to set or change the range
In Google Sheets in a web browser, use these steps to create a chart or change an existing chart’s source cells:
- Select the cells you want to chart, including useful header and label cells, and choose Insert > Chart. Sheets creates a chart and opens the Chart editor. If a chart already exists, click it, open its three-dot menu, and choose Edit chart.
- In the Chart editor, choose the Setup tab. Find the Data range box near the top.
- Enter a range in A1 notation, such as
A1:B10, or click the range selector at the right of the box and select cells in the sheet. Confirm the selection if the range selector prompts you to do so. - Check the chart preview. Adjust X-axis, Series, and the options for using a header row or label column if Sheets has assigned the cells incorrectly.
The chart updates as you change its setup. You can also select the chart and drag its blue handles to reposition or resize it; that changes the chart object’s size or location, not its data range. If the Chart editor is closed, reopen it from the chart’s three-dot menu.
How Sheets reads rows, columns, headers, and labels
Sheets tries to infer the structure of the selected cells. A common arrangement is one row of headings, a first column of category labels, and one or more columns of numeric series. If the data is arranged this way, turn on Use row 1 as headers and Use column A as labels when those options match the selected range. The displayed row or column references may differ if your range starts elsewhere.
Consider a table with quarters in A2:A5, product names across B1:D1, and sales figures in B2:D5. Selecting A1:D5 lets Sheets use the product names as series names and the quarter names as category labels. If the chart instead treats each quarter as a separate series, use the Switch rows/columns option in Setup. This changes how the same cells are grouped; it does not alter the worksheet data.
- Headers identify series, such as “Online” or “Store.”
- Labels identify categories, such as months or product names.
- Series are the values plotted against those categories. A chart can contain more than one series when the selected layout supports it.
Not every chart uses labels in the same way. A pie chart generally needs category names and one numeric series. A scatter chart uses numeric values for both axes, so text categories that work in a column chart may not make sense as its horizontal values. If the chart type does not fit the shape or meaning of the data, changing the range alone may not fix the result.
Reading and selecting A1 range notation
In a reference such as A1:B10, the first part names the top-left cell and the second part names the bottom-right cell. The colon means the range includes the cells between those endpoints. Thus, A1:B10 covers two columns and ten rows, or twenty cells. A single-column range can be written A1:A10; a single cell can be written A1.
When the data is on another sheet in the same spreadsheet, a range reference can include the sheet name, for example Data!A1:B10. If the sheet name contains spaces or special characters, put it in single quotation marks, as in 'Monthly Data'!A1:B10. Selecting the cells with the range selector is often easier than typing a reference, especially when sheet names are involved.
A chart may use more than one range when its labels and values are in separate blocks. In the Chart editor, use the option to add another range where available, then check the preview and the assigned axis and series. Do not assume that two distant blocks will be combined in the intended order automatically. A clean, contiguous table with labels beside values is usually easier to maintain and less prone to accidental series changes.
Choosing a range that remains useful as data grows
A range ending at row 20, such as A1:B20, names a fixed block. If you later add data in row 21, check whether the chart includes it; if not, edit the range to include the new row. This is particularly important when a chart is copied, when rows are added in a different part of a sheet, or when the chart’s source is a manually selected block.
One practical option is to select a range with room for expected new records, such as A1:B100 for a small table that is likely to grow. This avoids editing the range after every addition, but unused rows may be included in the chart’s source. Test the preview with blank rows and your chart type, since empty cells can be displayed or handled differently depending on the chart and its settings.
Using whole-column references such as A:B may be convenient for a continuously growing table, but it can also include unrelated content elsewhere in those columns. Keep chart data in a dedicated table, use consistent headers, and avoid placing notes or totals within the source block unless you want them plotted. For a report that must remain predictable, periodically verify the range and preview after adding rows.
Common data-range problems and how to fix them
- The chart omits recent rows: Open Setup > Data range and extend the range. Then confirm that the added cells contain the expected labels and numbers.
- Headings appear as data: Include the heading row only if you want it used as a header, and check Use row 1 as headers or the corresponding header option for your selected range.
- The legend or categories are reversed: Try Switch rows/columns, then inspect the X-axis and Series fields. A chart can plot the right cells in the wrong orientation.
- Blank cells or text produce gaps or unexpected points: Check for empty cells, text mixed into numeric columns, and stray values inside the range. Keep each series column consistent, and make sure labels are not accidentally included as numeric values.
- Extra data appears: Narrow the range or move notes and totals outside the chart’s source table. A chart includes cells in its range even if you did not intend them to be part of the visualization.
If a chart looks wrong after changing its range, first verify the exact cells, then verify the header and label options, and finally verify the chart type. This order helps distinguish a range-selection problem from a data-layout problem or a chart-type mismatch.
Example: charting monthly totals and multiple categories
Suppose A1:C4 contains a header row with “Month,” “Online,” and “Store.” Rows 2 through 4 contain January, February, and March with a number for each sales channel. Selecting A1:C4 gives Sheets a category column and two value series. A column chart can compare the channels for each month; a line chart can emphasize changes across the three months.
If you select only B1:C4, the channel names and values remain, but the month labels in column A are absent. Sheets may use row numbers or otherwise produce an unhelpful axis. Add column A to the range, or assign the month cells as the X-axis where the Setup controls allow it. If the chart shows three channel-like series instead of two, check whether the header row was recognized and whether the rows and columns need to be switched.
This example also shows why selecting the entire table is often the safest starting point: adjacent headers, category labels, and values give Sheets clear context. Still, review the preview rather than assuming automatic detection is correct, especially with irregular tables, merged cells, blank header cells, or extra totals.
Google Sheets charts compared with Excel charts
The general idea is similar in Excel: a chart references worksheet cells, and changing its source data can change the plotted values. The interface is different. This guidance uses Google Sheets in a browser, where chart ranges are edited in the Chart editor through Setup > Data range. Excel for Microsoft 365 on Windows has its own chart data-selection controls on the ribbon, so Sheets menu paths should not be followed in Excel.
In either application, a chart range does not necessarily mean the chart will intelligently discover every future record. A fixed source range should be checked when data is added. The reliable habit is to keep the source table orderly and inspect the chart after the table changes.
Frequently Asked Questions
How do I find the data range for a chart in Google Sheets?
Select the chart, open its three-dot menu, choose Edit chart, and look in the Chart editor’s Setup tab. The Data range box shows the source reference or references.
Can I change a chart’s data range after creating it?
Yes. Open Edit chart, change the range in Setup > Data range, and check the preview. You can also adjust the X-axis and series assignments if the revised range has a different layout.
Why is my Google Sheets chart not showing all rows?
The chart may use a range that ends before the missing rows. Check the Data range box and extend the reference to include them. Also check whether the cells contain blanks or text where the chart expects numeric values.
Should I include the header row in a chart range?
Usually, yes, when the headings name the series. Include the row and make sure Sheets is set to use it as headers. For a chart without a header row, select the data and labels you want without treating a first row of values as headings.
Does changing the data range change the chart’s formatting?
It can affect the chart’s legend, axes, and series because those depend on the selected cells, but it does not directly set styling such as colors or titles. Use Customize for appearance settings and Setup for the source data and its structure.
Related
- Excel Time Format: Show Hours and Minutes Only Correctly
- Excel Time Difference in Seconds: How to Calculate
- Excel Date Without Year: Display a Date Without Its Year
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Pivot Table Row Labels: How to Change the HeaderIn Excel for Microsoft 365 on Windows, click the PivotTable cell that says Row Labels, type the heading…
- Excel Pivot Table Gantt Chart: Build and Update a ScheduleYes—you can make a Gantt-style chart from Excel PivotTable data, but Excel does not have a dedicated Gantt…
- Create a Gantt Chart in Excel with a Pivot Table?Yes—but a PivotTable does not have a built-in Gantt view. In Excel for Microsoft 365 on Windows, summarize…
- Add an Upper Limit Line to an Excel ChartTo add an upper limit line to an Excel chart, create a helper series whose value repeats the…
- Spider Web Chart in Excel: Make a Radar Chart Look GreatTo make a spider web chart look great in Excel, arrange comparable measures in a table, select the…
- Google Sheets Gantt Chart for Project TimelinesTo make a project timeline Gantt chart in Google Sheets, put tasks and start dates in columns, calculate…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.