How to create an interactive chart with checkboxes in Excel

  • Excel
  • 2016
Excel has a lot of different, useful features to help you to present data. There are a lot of different charts you can create (see charts). One of the features for presenting your data is an interactive chart with checkboxes.

See also interactive charts.

Interactive chart with check boxes in Excel 2016

To create interactive chart with checkboxes, do the following:

    1.    Add additional data to your spreadsheet for checkbox values:

For example, enter in the cells G2 and G3 the values TRUE :

Additional data for check boxes in Excel 2016

    2.    Create data ranges, which will be used for the interactive chart:

    2.1.    On the Formulas tab, in the Defined Names group, click Define Name (see Creating and using named ranges for more details):

Defined Names in Excel 2016

    2.2.    In the New Name dialog box:

New Name dialog box in Excel 2016
  • In the Name field, enter the name of this new range, for example Series1,
  • In the Refers to field, enter this formula:

= IF (<condition>, <series data>, 0)

Where, condition is the option to show this data series.

In this example:

= IF ($G$2, $C$3:$C$14, 0)

    2.3.    Add the new data range for the other series.

In this example:

  • Name: Series2,
  • Refers to: = IF ($G$3, $D$3:$D$14, 0).

    3.    Create a chart that includes all data series:

Chart with new data in Excel 2016

    4.    Change the data series:

    4.1.    Do one of the following:

  • On the Design tab, in the Data group, choose Select Data:
    Data in Excel 2016
  • Right-click in the chart area and choose Select Data... in the popup menu:
    popup in Excel 2016

    4.2.    On the Select Data Source dialog box, for the Legend Entries (Series), select first data series that you would like to hide and show using the checkboxes and click the Edit button:

Select Data Source in Excel 2016

    4.3.    In the Edit Series dialog box, change Series name and Series Y values (or Series values) to the appropriate names:

Edit Series in Excel 2016

    4.4.    Repeate the previous steps for all other data series that you will show and hide using the checkboxes.

    5.    Add the checkboxes to the chart:

    5.1.    On the Developer tab (see Show the Developer tab), in the Controls group, click the Insert drop-down list and then choose Check Box:

Controls, Check box in Excel 2016

Add as many checkboxes as series will be selected and place them where you want.

In this example just two checkboxes were used:

Chart with option buttons in Excel 2016

    5.2.    Format checkboxes:

    5.2.1.    Double-click on every check box and change the label.

    5.2.2.    Right-click on the check box and choose Format Control... form the popup menu:

Format Control in Excel 2016

    5.2.3.    In the Format Control dialog box, on the Control tab, choose the appropriate cell in the Cell link field (in this example, G2 ):

Format Control Check box in Excel 2016

    5.2.4.    Format other checkboxes (in this example, for the cell G3 ).

Make any other adjustments to get the look you desire.

Note: To show data series, Excel will use the colors from the theme by default. To use your colors for checked data series, create a new theme with custom colors. For example:

Custom colors for chart in Excel 2016

See How to change the default colors that Excel uses for chart series for more details.

Thank you for visiting OfficeToolTips

We are glad to help you in your work. However, you are using ad blocker and our efforts will not be rewarded.

Please consider disabling ad blocker before continuing the reading.