Unhide All Rows / Columns

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on December 2, 2021

This tutorial will demonstrate how to unhide all rows and / or columns in an Excel worksheet using VBA.

Unhide All Rows

To unhide all rows in an Excel sheet, we will set the Hidden Property of all of the rows to FALSE.

We can access all rows by using the EntireRow Property of the Cells Object:

Cells.EntireRow.Hidden = False

or by using the EntireRow Property of the Rows Object:

Rows.EntireRow.Hidden = False

Unhide All Columns

Similarily, we can unhide all columns in an Excel sheet, by adjusting the Hidden Property of all the Columns.

You can access all of the columns by using the EntireColumn Property of the Cells Object:

Cells.EntireColumn.Hidden = False

or by using the EntireColumn Property of the Columns Object:

Columns.EntireColumn.Hidden = False

Hide All Rows or Columns

Of course, to hide all rows or columns, just set the Hidden Property to TRUE:

Columns.EntireColumn.Hidden = True

Macro to Unhide All Rows and Columns

Use this macro to unhide all rows and columns in a worksheet:

Sub Unhide_All_Rows_Columns()
    Columns.EntireColumn.Hidden = False
    Rows.EntireRow.Hidden = False
End Sub

Macro to Unhide All Rows and Columns on all Sheets

This macro will unhide all rows and columns in all sheets in an Excel workbook:

Sub Unhide_All_Rows_Columns_in_Workbook()
    Dim ws As Worksheet
    
    For Each ws In Worksheets
        ws.Columns.EntireColumn.Hidden = False
        ws.Rows.EntireRow.Hidden = False
    Next ws
End Sub

 

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro - A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users! vba save as


Learn More!
vba-free-addin

VBA Code Examples Add-in

Easily access all of the code examples found on our site.

Simply navigate to the menu, click, and the code will be inserted directly into your module. .xlam add-in.

(No installation required!)

Free Download

Return to VBA Code Examples