How to Add a Scroll Bar to a Chart in Excel – 6 Steps

This is an overview.

Overview of Adding Scroll Bar in Excel Chart


Step 1 – Create an Excel Chart from the Dataset

  • Select the whole data.
  • Go to the Insert tab and choose a chart.

The chart is created:

How to Add Scroll Bar in Excel Chart


Step 2 – Insert a Scroll Bar

  • Select Developer and click Insert.
  • Choose Scroll Bar in Form Controls.
  • Drag the cursor to create the scroll bar under the chart.
    Creating Scroll Bar under the Chart

Step 3 – Customize the Scroll Bar

  • Right-click.
  • Select Format Control.
    How to Add Scroll Bar in Excel Chart
  • In the Format Control dialog box, set up the parameters:
    • Minimum Value: 0
    • Maximum Value: 8 (there are 11 bars and you want to show 3 bars at a time: the scroll bar value 11 will show bars 9-11)
    • Incremental Change: 1
    • Page Change: 1 (if you click the scroll bar area, the scroll box will move 1 step at a time)
    • Cell Link: $C$17
    • Click OK.

    Setting up Parameters for Scroll Bar

 


Step 4 – Create Named Ranges Using Formulas and Linked Cell Values

  • Define how many bars will be visible in the chart.
    Defining Number of Bars for Chart
  • Select Formulas > Define Name.
    How to Add Scroll Bar in Excel Chart
    In the Edit Name dialog box:
  • Name the range.
  • Use the following formula in ‘Refers to‘ to define the value in B5: B14:

=OFFSET('Data Table'!$B$4,'Data Table'!$C$17+1,0,'Data Table'!$C$18,1)
The formula uses the OFFSET function which defines a partial dynamic range from B5:B14. The linked cell (‘Data Table’!$C$17) provides the number of rows of the partial range. The height of the range is set by the cell reference ‘Data Table’!$C$18.

  • Click OK.
    Creating Named Range (Name)
  • Use the following formula in the ‘Refers to’ with the name Average to define C5:C14:

=OFFSET('Data Table'!$C$4,'Data Table'!$C$17+1,0,'Data Table'!$C$18,1)
The OFFSET function evaluates the values in C5 till the end of the table, ignoring other values.


Step 5 – Modify the Data Range in the Chart Using the Named Ranges

  • Right-click the chart and choose Select Data.
  • In Select Data Source, select the column heading in Legend Entries (Series) and go to Edit.
    Editing Data Range
  • In the Edit Series dialog box:
    • Enter the reference of the column heading in Series name.
    • Use the named range for numeric data (Average) in Series values.
  • Click OK.
    Setting up Dynamic Data Range
  • Click Edit in Horizontal (Category) Axis Labels.
    Editing Horizontal Labeling of the Chart
  • Use the named range for names (Name) in Axis label range and click OK.
    Setting up Dynamic Horizontal Labeling
  • Click OK in the Series Data Source dialog box.
    Completing Setup for Chart to Use Scroll Bar

Step 6 – Use the Scroll Bar in the Chart

Using this Scroll Bar, you will see 3 vertical bars out of 11 in the chart. Observe the GIF.

Use of Scroll Bar to Control Charts

You see three vertical bars each time you scroll.


Download Practice Workbook


Frequently Asked Questions

Can I use multiple scroll bars in one chart?

Yes, you can use multiple scroll bars to control different aspects of your chart, such as axis ranges or data series. Each scroll bar should be linked to a different cell.

How do I set up a dynamic range for my chart using a scroll bar?

Define a data range and use formulas that incorporate the value in the linked cell (controlled by the scroll bar) to determine the dynamic range. Use the OFFSET, INDEX, or other functions.


Related Articles


<< Go Back to Scrollbar in Excel | Excel Parts | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Naimul Hasan Arif
Naimul Hasan Arif

Naimul Hasan Arif, a BUET graduate in Naval Architecture and Marine Engineering, has been contributing to the ExcelDemy project for nearly two years. Currently serving as an Excel and VBA Content Developer, Arif has written more than 120 articles and has also provided user support through comments His expertise lies in Microsoft Office Suite, VBA and he thrives on learning new aspects of data analysis. Arif's dedication to the ExcelDemy project is reflected in his consistent contributions and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo