Unhide All Rows and Columns

This simple macro automatically unhides all rows and columns for you.

VBA Code

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

How This Macro Works

In this macro, we call on the Columns collection and the Rows collection of the worksheet. Each collection has properties that dictate where their objects are hidden or visible. Running this macro unhides every column in the Columns collection and every row in the Rows collection.

How to Use This Macro

To use this macro, you can copy and paste it into a standard module:

  1. Activate the Visual Basic Editor by pressing ALT F11.
  2. Right-click the project/workbook name in the Project window.
  3. Choose Insert -> Module.
    Insert Module
  4. Type or paste the code in the newly created module.

Leave a comment

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

Format your code: <pre><code class="language-vba">place your code here</code></pre>

  1. FE

    thank you so much
    it was help full to me

  2. JE

    Hi, we need to hidden unused rows in excel using Excel VBA. Can you please help us..

  3. HO

    Don't worry about the ambiguous future, just work hard for the sake of clarity

More comments