How to Unhide Rows in Excel Using Shortcuts (3 Methods)

Dataset Overview

Our dataset to demonstrate these methods, is a list of students with their hometowns and departments. The 5th, 7th, 8th, 10th, 12th, and 15th rows are hidden.

Shortcuts to unhide rows in Excel


Method 1 – Double Click

  • In your datasheet, locate the hidden row (e.g., 5th row).
  • Place your mouse pointer between the 4th and 6th rows.

Shortcuts to unhide rows in Excel

  • Double-click the mouse to unhide the 5th row.
  • Repeat for other hidden rows.

Shortcuts to unhide rows in Excel by double click

 

Read More: How to Unhide Rows in Excel


Method 2 – Shortcut (CTRL + SHIFT + 9)

2.1. Unhide a Row using CTRL + SHIFT + 9

  • Select adjacent rows (e.g., 4th and 6th) around the hidden row.

Shortcuts to unhide rows in Excel

  • Press CTRL + SHIFT + 9 to unhide the selected row.

Excel will unhide the 5th row, as it was between the selected 4th and 6th row.

Shortcuts to unhide rows in Excel


2.2. Unhide Several Adjacent Rows using CTRL + SHIFT + 9

  • For multiple adjacent hidden rows, select the appropriate range (the 6th and 9th rows).

  • Then press CTRL + SHIFT + 9.

Shortcuts to unhide rows in Excel using CTRL + SHIFT + 9

The 7th and 8th rows will appear.

Shortcuts to unhide rows in Excel using CTRL + SHIFT + 9


2.3. Unhide Several Non-Adjacent Rows using CTRL + SHIFT + 9

  • Select a range of rows where the hidden rows exist, select from 9th row to 16th row.

  • Press CTRL + SHIFT + 9.

The 10th, 12th, and 15th rows will appear.

Shortcuts to unhide rows in Excel using CTRL + SHIFT + 9


Method 3 – Shortcut using VBA

3.1. Shortcut to Unhide a Row in Excel using VBA

To unhide a row, (the 5th row in this case):

  • Go to Developer tab >> select Visual Basic

Shortcuts to unhide rows in Excel using VBA

  • Insert a new module (Insert tab > Module).

Shortcuts to unhide rows in Excel using VBA

  • Enter the following code:
Sub Unhide_A_Row() 
Worksheets("Unhide a Row VBA").Range("5:5").EntireRow.Hidden = False 
End Sub

Unhide Rows using VBA

Here, a Sub Procedure Unhide_A_Row was created, and it mentioned the worksheet. The Range.Hidden property was used and set to False as it must unhide the entire row. Range (“5:5”) indicates that the range starts and ends in the 5th row.

  • Run the program to unhide the 5th row in the specified worksheet.

Shortcuts to unhide rows in excel

Excel will unhide the 5th row in the “Unhide a Row VBAdatasheet.


3.2. Shortcut to Unhide Rows in Excel using VBA (Adjacent)

In our dataset, 7th, and 8th, two adjacent rows are hidden. To unhide these rows using VBA:

  • Open the VBA editor and insert a new module (follow the steps explained in section 3.1).
  • Enter the following code:
Sub Unhide_Adjacent_Rows()
Worksheets("Unhide Adjacent Rows VBA").Range("7:8").EntireRow.Hidden = False
End Sub

Unhide Rows using VBA

Here, a Sub Procedure Unhide_Adjacent_Rows was created, and it mentioned the worksheet. The Range.Hidden property was used and set to False as it must unhide the entire row. Range from (“7:8”) indicates that the range starts with the 7th row and ends at the 8th row.

  • Run the program to unhide the 7th and 8th rows in the specified worksheet.


3.3. Shortcut to Unhide Rows in Excel using VBA (Non-Adjacent)

In our dataset the 10th, 12th, and 15th rows are non-adjacent and hidden.  To unhide these rows using VBA:

  • Open the VBA editor and to insert a new module (follow the steps explained in section 3.1).
  • Insert a new module, and enter the following code:
Sub Unhide_Non_Adjacent_Rows()
Worksheets("Unhide Non Adjacent Rows VBA").Range("10:10,12:12,15:15").EntireRow.Hidden = False
End Sub

Shortcuts to unhide rows in excel

Here, a Sub Procedure Unhide_Non_Adjacent_Rows was created, and it mentioned the worksheet.The Range.Hidden property was used and set to False as it must unhide the entire row. Ranges from (“10:10,12:12,15:15”) indicate that the 10th, 12th, and 15th rows were selected.

  • Run the program to unhide the 10th, 12th and 15th rows in the specified worksheet.

Note: A line break was used at the 2nd line. It is optional. The code will also run if you do not use the line break.


3.4. Unhide All Rows in Worksheet using VBA

  • To unhide all the hidden rows in the worksheet, using VBA:
  • Open the VBA editor and insert a new module (follow the steps explained in section 3.1).
  • After inserting a new module, enter the following code:
    Sub Unhide_All_Rows()
Worksheets("Unhide All Rows VBA").Rows.EntireRow.Hidden = False
End Sub

Here, a Sub Procedure Unhide_All_Rows was created, using the Worksheet.Cells Property and setting the property to False as it must unhide all the hidden rows in the worksheet.

Shortcuts to unhide rows in excel

  • Run the program. Excel will unhide the 5th, 7th, 8th, 10th, 12th, and 15th rows in the datasheet.

Practice Workbook

A practice worksheet has been attached.


Download Practice Workbook

You can download the practice workbook from here:


Related Articles


<< Go Back to Hide Rows | Rows in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Akib Bin Rashid
Akib Bin Rashid

AKIB BIN RASHID, a materials and metallurgical engineer, is passionate about delving into Excel and VBA programming. To him, programming is a valuable time-saving tool for managing data, files, and internet-related tasks. Proficient in MS Office, AutoCAD, Excel, and VBA, he goes beyond the fundamentals. Holding a B.Sc in Materials and Metallurgical Engineering from Bangladesh University of Engineering and Technology, MD AKIB has transitioned into a content development role. Specializing in creating technical content centred around Excel and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo