How to toggle visibility of rows in Excel without right-clicking or a macro

Sometimes you want to make it easy to toggle the visibility of rows in an Excel spreadsheet. Consider the following example where the top of the worksheet contains help instructions:

These instructions are intended to guide a new user through each step of the worksheet. While useful to new users, experienced users may want to hide the instructions so they have more space for data.

One option is to highlight the rows and click Hide. This works on all platforms but is not very user friendly. Another option is to write a macro that toggles the rows when a button is clicked. Unfortunately, this approach does not work on the web, and it causes a macro warning.

There is another option which is supported on Windows, Mac, and the web: outlining. Outlining is an Excel feature that groups rows into an outline structure that can be expanded and collapsed. We can use this outlining to toggle the help text.

To create the outline, you first highlight the rows you want to group together, and then click Data > Group or Data > Outline > Group depending on your Excel version. Excel will then show the outline controls on the left side:

To toggle visibility, click the button to collapse, or the + button to expand:

To ungroup, select the rows and go to Data > Outline > Ungroup.

This is not exactly the intended use of outlining, but it does make it easy to toggle the help text without a macro and without requiring the user to know how to hide and unhide rows.

Instructions

  1. Select the rows you want to toggle as a group

  2. Click Data > Outline > Group

  3. Toggle the rows by clicking the – or + button near the upper-left corner

  4. To ungroup, select the rows and click Data > Outline > Ungroup.

Reference

License

Licensed under CC BY 4.0

You are free to share and adapt this content for any purpose as long as you give appropriate credit in a reasonable manner.

No affiliate links

We do not participate in affiliate marketing, nor are we paid to mention any products or services.

Leave a Reply

Your email address will not be published. Required fields are marked *