How to Remove All Hidden Rows or Columns in Excel

bardimin pic

Written by Bardimin

On September 13, 2022
Home » Blogs » Software » Ms Excel » How to Remove All Hidden Rows or Columns in Excel

Have you ever hidden rows or columns in ? Almost all users have probably done it.

Many Excel users hide rows or columns that they do not want to show for various reasons. They hide for a while that the data display looks good.

This is one way to keep useful data visible, and there is no need to delete data you do not need to be visible.

When the data is ready for you to publish or ready for you to share, the hidden rows or columns will appear annoying. If there are a lot of hidden rows or columns, deleting them manually is a time-consuming task.

To solve this, Excel has a built-in function of finding and removing hidden rows and columns at once. Here are some easy and quick steps to remove all hidden rows or columns in Excel.

Remove All Hidden Rows or Columns in Excel with Inspect Document

  1. Click the “File” tab on the Excel menu.
excel file
  1. Then click the “Info button. In the “Inspect Workbook” section, click the “Check for Issues” button. Next, select the “Inspect Document” option. If you have not saved the file, it will be a warning to save the file first.
excel inspect documents
  1. In the “Document Inspector dialog box, click the “Inspect” button.
excel Document Inspector
  1. Then swipe down and look for “Hidden Rows and Columns“. Next, click on the “Remove All” button.
excel Document Inspector remove

Be careful in doing so. You can not return to the previous with the “Undo” process.

Remove All Hidden Rows or Columns in Excel with VBA

If you don't know how to use VBA in , you can look at our other articles. How to Make Simple Macros in Excel.

The following VBA will delete all rows and columns in a Worksheet.

Sub DeleteHiddenRowsColumns()
Dim sht As Worksheet
Dim LastRow as Integer
Dim LastCol as Integer
Set sht = ActiveSheet
LastRow = sht.UsedRange.Rows(sht.UsedRange.Rows.Count).Row
LastCol = sht.UsedRange.Columns(sht.UsedRange.Columns.Count).Column
For i = LastRow To 1 Step -1
If Rows(i).Hidden = True Then Rows(i).EntireRow.Delete
Next
For i = LastCol To 1 Step -1
If Columns(i).Hidden = True Then Columns(i).EntireColumn.Delete
Next
End Sub

Latest Articles

How to Sum Number Columns and Rows in a Microsoft Word Table

How to Sum Number Columns and Rows in a Microsoft Word Table

Microsoft Word is known as a popular program for editing documents, but did you know that you can also perform calculations in Word? One of the biggest challenges faced during the manual data entry process is the possibility of errors in performing numerical...

Redirect and Block URLs with HOSTS File on Windows

Redirect and Block URLs with HOSTS File on Windows

Redirect and Block URLs you can easily on Windows. Just by adding the IP of a website, you can redirect or block it. Of course, this is very useful to limit the access of your employees or children from accessing websites that you do not allow. Your Windows PC has...

Repeating and Keeping Table Headings on Each Page in Microsoft Word

Repeating and Keeping Table Headings on Each Page in Microsoft Word

Using tables is one efficient and organized way to display data in rows and columns. Good table formatting will make the table visually appealing. If you often work with Microsoft Word documents, chances are you need to periodically use tables when recording data. In...

How to Bypass Forgotten BIOS Password

How to Bypass Forgotten BIOS Password

If you have created a BIOS password for your PC/Laptop and forgot it, you may have to send it back to the manufacturer. Don't worry, there are still several methods you can use to bypass or unlock the BIOS password. The BIOS password serves as a form of authentication...

How Proxy Anonymity Works

How Proxy Anonymity Works

The exchange of information on the Internet is carried out on a client-server model. The client sends a request (what files he needs) and the server sends a reply (what files he needs). For close cooperation (full understanding) between the client and the server, the...