How to Create a Dynamic Chart Range in Excel (Fix Reference Errors)
Question details
The user needs to successfully create an auto-expanding dynamic chart using OFFSET or INDEX named ranges.

- Product
- Microsoft 365 Excel
- Device & OS
- not provided
- Scenario
- Creating a chart data range that automatically expands as new rows are added to the worksheet.
- Observed behavior
- A dynamic named range is accepted in the Name Manager but produces an error when applied as the chart's data series range, specifically when worksheet names contain spaces.
Ensure your chart data is organized in contiguous rows or columns without blank cells, as blank cells can disrupt the counting functions used in dynamic range formulas.
Fix Worksheet Name Formatting in Name Manager
Resolve chart reference errors by ensuring single quotation marks are added around worksheet names that contain spaces within the dynamic range formula.
When referencing a worksheet name that includes spaces (such as 'Summary One'), the formula requires single quotation marks around the sheet name to process correctly. Missing these quotes will cause an error when you try to apply the named range to a chart.
Navigate to the Formulas tab on the Excel ribbon and click on Name Manager.
Select the dynamic named range you created for your chart and click into the 'Refers to' box at the bottom.
Check the worksheet references. If the sheet name contains spaces, enclose it in single quotation marks. For example, use =OFFSET('Summary One'!$AT$5,0,0,COUNTA('Summary One'!$AT$5:$AT$31)).
Click the checkmark icon next to the input box to apply and save the corrected formula.

Apply the Correct COUNT Function for Dynamic Axes
Ensure the dynamic axis expands correctly by choosing the right counting function based on whether your cells contain text, numbers, or formulas.
Link the Dynamic Range to the Chart Properly
Correctly format the workbook and named range reference in the chart's data source settings to prevent invalid reference errors.
Create Dynamic Charts Easily in WPS Spreadsheet
WPS Spreadsheet offers seamless support for dynamic named ranges, OFFSET, and INDEX functions, making it incredibly simple to create auto-expanding charts. It provides an intuitive interface that automatically handles syntax issues like quotation marks.
- 1. Define the Range: Open your file in WPS Spreadsheet, navigate to the Formulas tab, and click Name Manager to create a new named range.
- 2. Enter the Formula: Use the OFFSET or INDEX formula. WPS will automatically handle worksheet name syntax (like adding single quotes) when you manually select the data cells.
- 3. Insert the Chart: Go to the Insert tab, select your preferred Chart type, right-click the blank chart area, and choose 'Select Data'.
- 4. Link the Named Range: In the series values, type your workbook or sheet name followed by the defined name (e.g., Sheet1!MyDynamicData) and click OK.

Frequently Asked Questions
Why does Excel throw an error when I use a dynamic named range in a chart?
This usually happens for two reasons: either the worksheet name contains spaces but lacks single quotation marks in the Name Manager formula, or you did not include the workbook/worksheet name when typing the named range into the chart's 'Select Data' dialog (e.g., you typed =DataRange instead of =Book1.xlsx!DataRange).
Can I use INDEX instead of OFFSET for dynamic charts?
Yes, using INDEX is often preferred for dynamic ranges. INDEX is a non-volatile function, meaning it only recalculates when the specific data it references changes. OFFSET is volatile and recalculates every time any change is made in the workbook, which can slow down spreadsheet performance on large datasets.
Why isn't my chart updating automatically when I add new rows?
Check if your dynamic range formula is using the correct counting function. Use COUNTA for columns containing text or mixed data, and COUNT for strictly numerical columns. Also, ensure there are no blank cells within your data column, as a blank cell will disrupt the count and cause the range to fall short.




