How to Limit Data Range in Excel Chart (3 Handy Ways)

We have the following dataset containing the records of profits for 12 months of the year 2021.

how to limit data range in excel chart


Method 1 – Using the Chart Filters Feature

We will draw the graphs for profits between February and October.

using Chart Filters feature to limit data range in excel chart

  • Select the range you want to chart.
  • Go to the Insert tab, select the Insert Column or Bar Chart dropdown.
  • Choose a 2-D Clustered Column.

The chart will have all of the profit values from January to December.

  • Click on the Chart Filters icon.

You will get a list of month names that are selected as they have been plotted.

  • As we don’t want to see the profit for January, so we unchecked this option.
  • Scroll down to unselect the last two months.

using Chart Filters feature to limit data range in excel chart

  • Deselect November and October.

We obtained our required graph showing the profits from February to October.


Method 2 – Applying the Advanced Filter Feature to Limit the Data Range in an Excel Chart

To define the criterion for this filter, we have defined our criterion below this dataset, which is defining the range of the serial number up to which we will filter our dataset.

Applying Advanced Filter Feature to Limit Data Range in Excel Chart

  • Go to the Data tab, choose the Sort & Filter dropdown, and click Advanced.

The Advanced Filter dialog box will appear.

  • Select Filter the list, in-place as Action.
  • Choose the List range and Criteria range, then press OK.

You will get the following filtered dataset.

Filtered dataset to Limit Data Range in Excel Chart

  • Using our filtered dataset, we have created the following column graph like the previous method.

If you are facing the issue of showing all of the visible and non-visible cells in your chart, you can follow this step.

  • Right-click on your chart and choose Select Data.

The Select Data Source dialog box will pop up.

  • Click on Hidden and Empty Cells.

Applying Advanced Filter Feature to Limit Data Range in Excel Chart

The Hidden and Empty Cell Settings wizard will open up.

  • Uncheck the option Show data in hidden rows and columns.
  • Press OK.

Read More: How to Remove One Data Point from Excel Chart


Method 3 – Defining a Dynamic Range to Limit the Data Range in an Excel Chart

We will create a dynamic range to limit the range in an Excel chart.

Defining a Dynamic Range to Limit Data Range in Excel Chart


Step 1 – Applying TODAY and MONTH Functions

  • We want to plot the data up to the month of today’s date, so we have used the following formula in cell C18.
=MONTH(TODAY())

Here, the TODAY function will return today’s date, and then the MONTH function will determine the month number of this date.
As today’s date is 11/17/2022 (mm/dd/yyyy format), we are getting output as 11.

functions


Step 2 – Creating Dynamic Ranges

  • Go to the Formula tab and the Defined Names group, then select Name Manager.

  • You will get the New Name dialog box.
  • Write down the Name as Month and put down the following formula in the Refers to box:
=OFFSET('Dynamic Range'!$C$5,0,0,'Dynamic Range'!$C$18,1)

Formula Breakdown

  • ‘Dynamic Range’!$C$5 → it is the start cell of the Month
  • ‘Dynamic Range’!$C$18 → which is 11 here, represents the height of the extracted range.
  • 1 → represents the width of this extracted range.
  • Press OK.

Defining a Dynamic Range to Limit Data Range in Excel Chart

You will return to the Name Manager dialog box where you can see the created named range Month.

  • Press the New button to add another named range.

new range

  • Type the Name as Profit and put down the following formula in the Refers to box:
=OFFSET('Dynamic Range'!$D$5,0,0,'Dynamic Range'!$C$18,1)

Formula Breakdown

  • ‘Dynamic Range’!$D$5 → it is the start cell of the Profit
  • ‘Dynamic Range’!$C$18 → which is 11 here, represents the height of the extracted range.
  • 1 → represents the width of this extracted range.
  • Press OK.

You will return to the Name Manager again, where you can see the newly created named ranges.

  • Press Close.

close


Step 3 – Inserting the Chart

chart

  • Right-click on the chart and choose the Select Data option.

select data

You will be taken to the Select Data Source wizard.

  • Choose the Profit series and click on Edit.

The Edit Series dialog box will pop up.

  • Change the Series values to =’Dynamic Range’!Profit, where Profit is the dynamic range.
  • Press OK.

Defining a Dynamic Range to Limit Data Range in Excel Chart

  • After returning to the Select Data Source dialog box, under the Horizontal (Category) Axis Labels, click on Edit.

edit

The Axis Labels wizard will pop up.

  • Change the Axis label range to =’Dynamic Range’!Month, where Month is the dynamic range.
  • Press OK.

  • In the Select Data Source dialog box, press OK.

Defining a Dynamic Range to Limit Data Range in Excel Chart

You will get the column charts for profits up to November.

Read More: How to Change X-Axis Values in Excel


How to Change the Charts Dynamically Depending on the Data Range in Excel

We will create a Table to automatically change the chart range after deleting or inserting a row in the dataset.

inserting table to Limit Data Range in Excel Chart

  • Select the data range, go to the Insert tab, then choose Table.

The Create Table wizard will open up.

  • Check the option My table has headers and press OK.

This will create the following table.

inserting table to Limit Data Range in Excel Chart

We created the following column chart.

chart

  • Delete the row for the month of April.

delete

Our chart has been automatically updated by removing the column for April.

  • Insert a row below the row for the month of March to put down the data for April here again.

insert

  • Put down the profit for April.

The profit column for April will appear here again.

inserting table to Limit Data Range in Excel Chart

Read More: How to Change Chart Data Range Automatically in Excel


Practice Section

To practice by yourself, we have created a Practice section on the right side of each sheet.

practice section to Limit Data Range in Excel Chart


Download the Practice Workbook


Related Articles


<< Go Back to Data for Excel ChartsExcel Charts | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Tanjima Hossain
Tanjima Hossain

TANJIMA HOSSAIN is a marine engineer who enjoys working with Excel and VBA programming. For her, programming is a handy, time-saving tool for managing data, files, and online tasks. She's skilled in Rhino3D, Maxsurf C++, MS Office, AutoCAD, and Excel & VBA, going beyond the basics. She holds a B.Sc. in Naval Architecture & Marine Engineering from BUET and is now a content developer. In this role, she creates tech-focused content centred around Excel and VBA. Apart from... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo