How to delete hidden rows in Excel online

This post will guide you how to delete all hidden rows or columns in Excel 2010/2013/2016. How do I efficiently delete all hidden columns and rows in a worksheet in Excel. How to delete all hidden rows or columns with VBA macro in Excel.

If you want to delete all hidden rows or columns in Excel, just do the following steps:

#1 click File tab, and select Info menu from the popup menu list.

How to delete hidden rows in Excel online

#2 click Check for Issues button in the Info page. And select Inspect Document from the drop-down list. The Document Inspector dialog box will appear.

How to delete hidden rows in Excel online

#3 click Inspect button in the Document Inspector window.

How to delete hidden rows in Excel online

#4 click Remove All button in the Hidden Rows and Columns section.

How to delete hidden rows in Excel online

Delete All Hidden Row or Column with VBA Macro

You can also use an excel VBA macro to delete all hidden rows and columns in your worksheet. Just do the following steps:

#1 open your excel workbook and then click on “Visual Basic” command under DEVELOPER Tab, or just press “ALT+F11” shortcut.

How to delete hidden rows in Excel online

#2 then the “Visual Basic Editor” window will appear.

#3 click “Insert” ->”Module” to create a new module.

How to delete hidden rows in Excel online

#4 paste the below VBA code into the code window. Then clicking “Save” button.

How to delete hidden rows in Excel online

Sub deleteAllHidden() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets Dim lastRow lastRow = 4000 For iCntr = lastRow To 1 Step -1 If Rows(iCntr).Hidden = True Then Rows(iCntr).EntireRow.Delete Next Next ws End Sub

#5 back to the current worksheet, then run the above excel macro. Click Run button.

How to delete hidden rows in Excel online

Avoid unintentionally distributing hidden information, such as the document's author, names that are associated with comments or tracked changes, or hidden cells or worksheets, by removing hidden data.

To open the Document Inspector, click File > Info > Check for Issues > Inspect Document. The Excel Document Inspection window shown below opens up.

How to delete hidden rows in Excel online


Click Inspect to identify hidden content, and then click Remove All to remove the item of your choice.

How to delete hidden rows in Excel online

After you have completed these steps, save the document, and the spreadsheet will not contain the hidden data that you have removed.

Edit Document Properties, Personal Information and Other Document Data

To selectively edit or remove document data, click File > Info > Properties. Click Show All Properties. Delete or edit information.

How to delete hidden rows in Excel online

Selectively Remove or Edit Comments

Microsoft Excel offers the ability to add comments to workbooks. Typically, comments contain the name of the person who created them, and they appear as a small red triangle in the upper-right corner of a cell.

To view a comment, click the cell and the comment will pop up.

To delete a comment, right-click the cell containing the comment, and then click Delete Comment on the shortcut menu.

Selectively Display Hidden Cells, Rows, and Columns

In Microsoft Excel, it is possible to hide entire rows and columns of cells within a worksheet.

To unhide all of the cells in a worksheet:

  • Click the Select All button, in the upper-left corner of the worksheet or press Ctrl + A.
  • Click the Home tab > Format (in the Cells group) > Hide & Unhide > Unhide Rows or Unhide Columns.
  • All cells are now visible.

Selectively Display Hidden Worksheets

Workbooks in Microsoft Excel may contain hidden sheets that contain information.

To unhide sheets:

  • Click the Home tab > Format (in the Cells group) > Hide & Unhide > Unhide Sheet.
  • Click the name of the sheet you want visible and click OK.
  • The sheet is now visible.

Remove Tracked Changes manually or selectively


Microsoft Excel includes a Track Changes feature that allows you to track changes made to a shared workbook by a user. To remove tracked changes from a workbook, follow these steps:

  • Click the Review tab > Track Changes (in the Changes group)> Accept/Reject Changes.
  • Make your selection concerning each change that has been saved on the document. You must click Accept or Reject for a change before advancing the next change.
  • Accept or reject all changes by clicking Accept All or Reject All.

Learn more about Tracking and Reviewing Changes at microsoft.com.

Back to Removing Hidden Data Home

If you have a large workbook with a lot of hidden rows and columns, and now the hidden data are unavailable, you would like to delete all of them. How could you quickly delete them?

Delete all hidden rows and columns in a workbook with Inspect Document function

Delete all hidden rows and columns in active worksheet with VBA code

Delete all hidden rows or columns in a selection / worksheet / whole workbook with Kutools for Excel

How to delete hidden rows in Excel online
Delete all hidden rows and columns in a workbook with Inspect Document function

If you use Excel 2007, 2010 or Excel 2013, it is easily for you to remove the unwanted hidden rows or columns. You can do it as follow steps:

1. If you us Excel 2007, please click Office Button on the top left corner, and then click Prepare > Inspect Document. See screenshot:

How to delete hidden rows in Excel online

If you use Excel 2010/2013, please click File > Info > Check for Issues > Inspect Document, see screenshots:

In Excel 2013:

How to delete hidden rows in Excel online

In Excel 2010:

How to delete hidden rows in Excel online

2. Then a Document Inspector dialog box will appear, click Inspect button, and the hidden rows and columns in the whole workbook have been inspected, click Remove All button, see screenshot:

How to delete hidden rows in Excel online

3. And then click Close button to close the dialog. And all of the hidden rows and columns in the workbook will be removed.

Notes: 1. If there are formulas to manipulate the data in your workbook and the formulas call for data from hidden rows and columns, then deleting that information will cause incorrect result.

2. With this function, you can delete all of the hidden rows and columns in the whole workbook.

How to delete hidden rows in Excel online
Delete all hidden rows and columns in active worksheet with VBA code

If you just want to remove the hidden rows or columns in a worksheet, the following VBA code can help you. Please do as follows:

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: Delete all hidden rows and columns of active worksheet:

Sub deletehidden() For lp = 256 To 1 Step -1 If Columns(lp).EntireColumn.Hidden = True Then Columns(lp).EntireColumn.Delete Else Next For lp = 65536 To 1 Step -1 If Rows(lp).EntireRow.Hidden = True Then Rows(lp).EntireRow.Delete Else Next End Sub

2. Then press F5 key to execute the code. And all the hidden rows and columns have been deleted in the active worksheet.

Note: If there are formulas to manipulate the data in your workbook and the formulas call for data from hidden rows and columns, then deleting that information will cause incorrect result.

How to delete hidden rows in Excel online
Delete all hidden rows or columns in a selection / worksheet / whole workbook with Kutools for Excel

With the Delete Hidden (Visible) Rows & Columns utility of Kutools for Excel, you can quickly remove the hidden rows or columns in selected range, in active worksheet, in selected worksheets and in all worksheets.

If you have installed Kutools for Excel, please do as this:

1. Click Kutools > Delete > Delete Hidden (Visible) Rows & Columns, see screenshot:

How to delete hidden rows in Excel online

2. In the Delete Hidden (Visible) Rows & Columns dialog box, specify the scope that you want to apply the operation from Look in drop down list. (If you choose In Selected Range, you must select a range that you want to use first.) And then check Rows or Columns under Delete type. And select Hidden rows from Detailed type. Then click Ok, the hidden rows have been deleted from the selected range, see screenshot:

How to delete hidden rows in Excel online

To know more about this feature, please visit the Delete Rows & Columns function.

Free Download Kutools for Excel Now!

How to delete hidden rows in Excel online
Demo: Delete all hidden rows or columns in a selection / worksheet / whole workbook with Kutools for Excel

Related Article:

How to delete hidden worksheets in Excel?