Two top easiest ways to create a dynamic range in Excel chart
In Excel, you may insert a chart to more directly display the data for others. But in general, the data in the chart cannot be updated while new data added in the data range. In this article, it will provide two easiest ways to create a dynamic chart which will automatically change with the data range in Excel.
1. Select the data range you will use to create a chart, then click Insert > Table.
2. In the popping dialog, check My table has headers option as you need, and click OK..
Now keep the table selected, click Insert tab, and select a chart type to create a chart.
From now on, the data in chart will be updated automatically while data changed or added in the table.
1. Click Formulas > Define Name.
2. In the popping New Name dialog, type a name into the Name textbox, supposing chartmonth, then type below formula to the Refers to textbox. Then click OK.
=OFFSET('named range'!$A$2,0,0,COUNTA('named range'!$A:$A)-1)
In the formula, named range is the sheet that you place the source data for the chart, A2 is the first cell of the first column in data range.
3. Repeat step 1 and step 2 to create a new named range with formula. In the New Name dialog, give a name, supposing chartsales, then use below formula.
=OFFSET('named range'!$B$2,0,0,COUNTA('named range'!$B:$B)-1)
In the formula, named range is the sheet that you place the source data for the chart, B2 is the first cell of the second column in data range.
4. Then select the data range and click Insert tab, then choose one chart type as you need in the Chart group.
5. Then right click at the series in the created chart, in the context menu, click Select Data.
6. In the Select Data Source dialog, click Edit in the Legend Entries (Series) section, then in the popping dialog, use below formula to the Series value textbox to replace the original values, click OK.
='dynamic chart range.xlsx'!chartsales
dynamic chart range is the active workbook name, chartsales is the named range you created before, which contains the values.
7. Back to Select Data Source dialog, then click Edit in the Horizontal (Category) Axis Labels section. And in the Axis Labels dialog, use below formula to the Axis label range textbox, then click OK.
='dynamic chart range.xlsx'!chartmonth
dynamic chart range is the active workbook name, chartmonth is the named range you created before, which contains the labels.
From Now on, the chart data range can be updated automatically when you add, delete, or edit data in the two defined named ranges.