Create a Dynamic Chart Range in Excel (2 Methods)

Method 1 – Use an Excel Table to Create a Dynamic Chart Range in Excel

  • Select the whole dataset.
  • Press Ctrl + T keys.

A dialog box named Create Table will appear. In the dialog box, the table range is already there.

  • Check My table has headers.
  • Hit OK.

Dynamic Chart Range in Excel: Create a Table

  • Go to the INSERT tab from the main ribbon.
  • Click Insert Column Chart.
  • Select 2-D Column chart.

Insert column chart to create Dynamic Chart Range in Excel

Excel has created a column chart based on your Excel table data like this:

Dynamic range chart in Excel

  • We have inserted a new record. We inserted Bruce in the Name column and 42 in the Age column. These newly added records in the source data have already been added to the column chart.

Example of Dynamic Chart Range in Excel

Read More: How to Dynamically Change Excel Chart Data


Method 2 – Create a Dynamic Chart Range in Excel Using the OFFSET and COUNTIF Function

Step 1 – Creating Dynamic Named Ranges

  • Go to the FORMULAS tab from the main ribbon.
  • Select Name Manager.

Creating Dynamic Named Range for dynamic chart range in Excel

  • Click on New in the Name Manager dialog box.

Creating Dynamic Named Range: Name Manager

  • Insert Names in the Name bar.
  • Enter the following formula in the Refers to box.
=OFFSET(NamedRange!$B$2,0,0,COUNTA(NamedRange!$B:$B)-1,1)
  • Hit the OK command.

Offset formula to create a Dynamic Named Range

  • Hit the New command in the Name Manager dialog box again.
  • Insert Age in the Name box and the following formula in the Refers to box.
=OFFSET(NamedRange!$A$2,0,0,COUNTA(NamedRange!$A:$A)-1,1)
  • Hit the OK command.

The Name Manager dialog box will look like this:

Step 2 – Creating a Chart Using Dynamic Named Ranges

  • Go to the INSERT tab.
  • Select Insert Column Chart.
  • Choose the first 2-D column chart.

Creating Chart Using Dynamic Named Range

  • Go to the DESIGN tab and click on Select Data.

  • A dialog box called Select Data Source will open. Click the Add option under the Legend Entries (Series).

  • Enter the following formula in the Series values box in the Edit Series dialog box.
=NamedRange!Ages
  • Hit OK.

  • Go back to the Select Data Source dialog box.
  • Hit the Edit command under Horizontal (Category) Axis Labels.

  • Another dialog box called Axis Labels will appear. Insert the following formula in the Axis label range box.
=NamedRange!Names
  • Hit OK.

Read More: How to Create Chart with Dynamic Date Range in Excel


Download the Practice Workbook


Related Articles


<< Go Back to Dynamic Excel Charts | Excel Charts | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mrinmoy Roy
Mrinmoy Roy

Mrinmoy Roy, a dedicated professional with a BSc in Electronics and Communication Engineering from Khulna University of Engineering & Technology, Bangladesh, brings over two years of expertise to the ExcelDemy project. As a prolific contributor, he has authored around 180 articles, showcasing his deep knowledge and passion for Microsoft Excel, Data Analysis, and VBA. His unwavering commitment to continuous learning, combined with versatile skills, renders him well-suited for roles in data management and spreadsheet solutions. He has interest... Read Full Bio

2 Comments
  1. Hi Mrinmoy – Hope you are doing well !!
    I wanted to check if we can create the dynamic range when we have multiple rows and multiple column For Example:
    Jan-22 Feb-22 Mar-22 Apr-22 May-22 Jun-22 Jul-22
    x1 9 9 1 1 5 1 3
    x2 5 3 2 8 8 7 9
    x3 3 8 9 7 3 4 7

    above is the data and we will be getting new month column each month but for the graphs we only need to display the last 3 months

    • Reply Avatar photo
      Naimul Hasan Arif Oct 3, 2022 at 5:12 PM

      According to your requirements, you wanted to display the last 3 months’ data by a graph. You can follow the following procedure where I have tried to give you a simple solution that will help you display the last 3months’ data by graphical representation..

      Create a new column, input the following formula in the 1st cell of that column and AutoFill till the cell you need. This additional column will define with numerical value the last 3 rows containing data.

      =IF(AND(D4>0,ISBLANK(D5)),1,IF(B5=1,2,IF(B5=2,3,””)))

      Next, create a Pivot Table with Months as Filters, Last 3 Months as Axis, and Sum of Product 1, Sum of Product 2, and Sum of Product 3 as Values.

      Now, choose your preferred graphical representation format to display the last 3 months’ data.

       

      Note: Don’t forget to refresh the Pivot Table after inserting the new month’s data. Otherwise, the graph won’t get updated. Alternatively, you can use Auto Update Pivot Table to lessen your hustle.

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo