Yes. In Excel for Microsoft 365 on Windows, you can use a defined name for a chart’s data series or horizontal-axis labels, then select that name in the chart’s data settings. A fixed named range keeps a chart reference readable; a dynamic named range can expand as you add data.
What a named range does in a chart
A named range is a label for a cell or range of cells. For example, instead of pointing a chart series at cells B2:B10, you can give that range the name Revenue. The chart still reads the same cells, but the reference is easier to recognize and maintain.
A chart typically needs a range of values for each series and, optionally, a matching range of category labels. In a monthly sales chart, the values might be revenue in column B and the labels the month names in column A. You can name those ranges separately, then use them for the series and axis labels.
A name does not copy or store the data. It points to cells through a reference or a formula. If the reference is fixed, adding a row below it will not necessarily add that row to the chart. For expansion, the name itself must refer to a range that can grow, or the data can be organized in an Excel Table.
Create a fixed named range
For a chart that uses a stable set of cells, a fixed name is the simplest option. On Windows, select the cells, open Formulas > Define Name, enter a short name, confirm that Scope is set to Workbook if you want to use the name throughout the file, and check the reference before selecting OK. You can also create or edit names through Formulas > Name Manager.
For example, if the worksheet is named Data and revenue values are in B2:B6, the named range Revenue should refer to that exact range. If month labels are in A2:A6, create a second name such as Months for those cells. Names cannot contain spaces, and they cannot look like cell references such as A1. Use letters, numbers, periods, or underscores in a name, with a letter, underscore, or backslash as the first character.
Use workbook scope for names intended for charts across the workbook. Excel also allows worksheet-level names, but a same-named worksheet-level and workbook-level definition can make a reference ambiguous. A clear, unique workbook-level name is usually easier to manage.
Make a named range expand with new data
A fixed reference is not automatically dynamic. One way to make a name grow is to define its reference with INDEX and COUNTA. This example assumes the Data worksheet has a header in B1 and a continuous list of revenue values beginning in B2, with no unrelated content lower down in column B. In Name Manager, set Refers to for Revenue to:
=Data!$B$2:INDEX(Data!$B:$B,MAX(2,COUNTA(Data!$B:$B)))
With a header and five filled-in values in B1:B6, COUNTA returns 6, so the reference runs from B2 through B6. When another value is entered in B7, the reference extends through B7. MAX keeps the endpoint at row 2 when only the header is present; the named range then points at a blank cell rather than ending above its starting cell.
For the category labels, create a separate name using the same approach for column A. This example assumes a header in A1 and contiguous labels starting in A2:
=Data!$A$2:INDEX(Data!$A:$A,MAX(2,COUNTA(Data!$A:$A)))
These references depend on the list having no gaps. COUNTA counts populated cells rather than finding the last occupied row, so an empty cell in the middle can make the calculated endpoint too early. It also counts formulas that display an empty string and any unrelated content in that column. Keep the data column clean, or choose an Excel Table or another range design if those assumptions do not fit.
Assign the names to a chart
After creating the names, select the chart and go to Chart Design > Select Data. In the Select Data Source window, choose a series under Legend Entries (Series), select Edit, and enter the named range as the series values. Then use the Horizontal (Category) Axis Labels area and its Edit button to set the name for the labels. The values and labels should cover the same number of rows.
Excel may add the workbook name to a chart reference. If the name is Revenue in a workbook called SalesReport.xlsx, the series field may display a reference like =SalesReport.xlsx!Revenue. Let Excel write or complete the reference where possible; the exact displayed qualifier can vary with the workbook name and how the chart was created. If a name is not accepted, check that it exists in Name Manager, is workbook-scoped, and points to a valid range in the same workbook.
You can also create a chart from the data first, then replace its cell references with names through Select Data. For several series, edit each series separately and give each one the appropriate values name. A chart’s legend name is usually taken from the series name, often a header cell; the name for the values does not automatically supply that legend text.
Choose names that are clear and easy to maintain
Good names describe their purpose and make it obvious whether they refer to labels or values. For example, MonthlyRevenue and MonthLabels are clearer than Range1 and Range2. Keep a consistent naming pattern when a chart has several related series, such as ActualRevenue and BudgetRevenue.
- Name the category labels and each data series separately when the chart needs separate references.
- Use workbook scope when charts or formulas in different worksheets need the same definition.
- Check the Refers to field in Name Manager after adding, deleting, or moving source data.
- Keep each series range and its category-label range aligned in length and order.
- Avoid including totals or blank rows unless you specifically want them plotted.
Names are especially useful in reports where the source range changes or where a chart is maintained by someone who did not build it. They make references more understandable, but they do not validate the underlying data. A name pointing at the wrong column is still a wrong chart.
Named ranges versus Excel Tables
If new records are regularly appended to a list, an Excel Table is often simpler than a dynamic named range. Select the data, choose Insert > Table, confirm whether the data has headers, and create the chart from the table. Table-based charts generally include rows added to the table, while structured column names help identify the fields. This is a convenient option for routine data entry.
Named ranges are useful when the source is not a straightforward table, when a chart needs a particular subset, or when a workbook already relies on defined names. They also let you control the exact cells included. A table is not always a replacement: for example, a chart may need a range that skips a summary row or uses a separately calculated series.
Do not assume that a name must be used just because a chart can use one. For a small, unchanging chart, direct cell references are often easiest. For a growing list, a table may be easier to maintain. Choose the structure that makes the source data and expansion behavior clear to the next person working in the workbook.
Common problems and how to fix them
If the chart does not change after you add data, first check whether the name is static. Open Formulas > Name Manager, select the name, and inspect Refers to. If it ends at a fixed row, either extend that reference or replace it with an appropriate dynamic reference or table-based source. Also confirm that the new value is in the same continuous list and that the name points to the intended worksheet.
If the chart displays the wrong categories, inspect the horizontal-axis label reference separately from the series values. A chart can have correct numbers but mismatched labels if those ranges start on different rows or are in a different order. For a multi-series chart, verify each series independently; correcting one series does not automatically correct another.
Other common issues include a misspelled name, a worksheet-scoped name that is not available where expected, and extra cells counted by a dynamic reference. If the chart shows a total as another data point, check whether the named range includes the total row. If new data is skipped after a blank row, the COUNTA-based example is not suitable without adjusting the source layout.
In Excel for Mac, the names and chart controls are available, although ribbon placement and dialog appearance can differ from Windows. Excel for the web can handle many workbook and chart tasks, but when you need to inspect or precisely edit a chart’s series reference, open the workbook in the desktop app if the required controls are not available in the browser.
Frequently Asked Questions
Can I use a named range for chart data in Excel?
Yes. Create a defined name for the series values, then assign it in the chart’s Select Data settings. You can define another name for the horizontal-axis labels.
Will a named range automatically expand when I add a row?
Not if it refers to a fixed cell range. Use a dynamic reference that suits the data layout or create the chart from an Excel Table that includes new rows.
Why does Excel reject my named range in a chart?
Check that the name exists, that its scope is suitable, and that Refers to points to a valid range. Also confirm that you are entering it in the series values or axis-label field, not the series-name field.
Can one chart use several named ranges?
Yes. Each series can have its own values name, and the category labels can use a separate name. Make sure the ranges line up in length and order.
Should I use a named range or a Table for chart data?
For a simple list that keeps gaining rows, a Table is often easier. Use named ranges when you need a specific range, want readable references, or need more control over which cells a chart includes.
Related
- Excel Data Validation Calendar Drop-Down: What Works
- Excel Data Validation: Change Cell Colors Automatically
- Excel Data Validation Character Limits and Messages
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Line Chart With Two Y-Axes: How to Create OneYes. In Excel for Microsoft 365 on Windows, create a line chart, select the series that needs its…
- Room Chart in Google Sheets: Build One Step by StepYes. You can make a room chart in Google Sheets by arranging cells as rooms or seats, then…
- Excel Gantt Chart: Exclude Weekends in Your ScheduleYes. To make an Excel Gantt chart exclude weekends, build its timeline from working dates rather than consecutive…
- Steps Progress Chart in Excel: Build a Clear TrackerTo create a steps progress chart in Excel, list each step and its completion percentage, calculate the remaining…
- Excel Slicer Link to Different Pivot Tables: How It WorksYes. In Excel for Microsoft 365 on Windows, one slicer can filter multiple PivotTables when those PivotTables share…
- Google Sheets Chart Editor: Create and Customize ChartsThe Google Sheets Chart editor is the sidebar for creating and changing charts in a spreadsheet. Select the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.