跳到主要內容

如何刪除Excel中所有隱藏的行或列?

如果您有一個很大的工作簿,其中包含許多隱藏的行和列,而現在隱藏的數據不可用,那麼您想要刪除所有這些。 您如何快速刪除它們?

使用檢查文檔功能刪除工作簿中所有隱藏的行和列

使用VBA代碼刪除活動工作表中的所有隱藏行和列

使用Kutools for Excel刪除選擇/工作表/整個工作簿中的所有隱藏行或列


箭頭藍色右氣泡 使用檢查文檔功能刪除工作簿中所有隱藏的行和列

如果使用Excel 2007、2010或Excel 2013,則很容易刪除不需要的隱藏行或列。 您可以按照以下步驟進行操作:

1。 如果您使用Excel 2007,請單擊 Office 單擊左上角的按鈕,然後單擊 Prepare > 檢查文件。 看截圖:

文檔刪除隱藏行 1

如果您使用Excel 2010/2013,請單擊 文件 > 聯繫我們 > 檢查問題 > 檢查文件,請參見屏幕截圖:

在Excel 2013中:

文檔刪除隱藏行 2

在Excel 2010中:

文檔刪除隱藏行 3

2。 然後一個 文件檢查員 出現對話框,單擊 檢查 按鈕,並檢查了整個工作簿中的隱藏行和列,請單擊 全部刪除 按鈕,請參見屏幕截圖:

文檔刪除隱藏行 4

3。 然後點擊 關閉 按鈕關閉對話框。 並且將刪除工作簿中所有隱藏的行和列。

筆記:1.如果在工作簿中有一些用於處理數據的公式,並且該公式需要隱藏行和列中的數據,則刪除該信息將導致錯誤的結果。

2.使用此功能,您可以刪除整個工作簿中所有隱藏的行和列。


箭頭藍色右氣泡 使用VBA代碼刪除活動工作表中的所有隱藏行和列

如果您只想刪除工作表中的隱藏行或列,則以下VBA代碼可以為您提供幫助。 請執行以下操作:

1. 按住 ALT + F11 鍵打開 Microsoft Visual Basic for Applications 窗口。

2。 點擊 插入 > 模塊,然後將以下代碼粘貼到 模塊窗口.

VBA代碼:刪除活動工作表中所有隱藏的行和列:

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。 然後按 F5 執行代碼的鍵。 並且所有隱藏的行和列都已在活動工作表中刪除。

備註:如果存在用於處理工作簿中數據的公式,並且該公式需要隱藏行和列中的數據,則刪除該信息將導致錯誤結果。


箭頭藍色右氣泡 使用Kutools for Excel刪除選擇/工作表/整個工作簿中的所有隱藏行或列

隨著 刪除隱藏(可見)行和列 的效用 Excel的Kutools,您可以快速刪除選定範圍,活動工作表,選定工作表以及所有工作表中的隱藏行或列。

Excel的Kutools : 帶有300多個便捷的Excel加載項,可以在30天內免費試用.

如果你已經安裝 Excel的Kutools,請這樣做:

1. 點擊 庫工具 > 刪除 > 刪除隱藏(可見)行和列,請參見屏幕截圖:

2。 在 刪除隱藏(可見)行和列 對話框中,指定要從中應用操作的範圍 在看 下拉列表。 (如果您選擇 在選定範圍內,您必須先選擇要使用的範圍。)然後檢查 or 刪除類型。 並選擇 隱藏的行 詳細類型。 然後點擊 Ok,隱藏行已從選定範圍刪除,請參見屏幕截圖:

文檔刪除隱藏行 6

要了解有關此功能的更多信息,請訪問 刪除行和列 的功能。

立即免費下載Kutools for Excel!


箭頭藍色右氣泡 演示:使用Kutools for Excel刪除選擇/工作表/整個工作簿中的所有隱藏行或列

Excel的Kutools:具有300多個方便的Excel加載項,可以在30天內免費試用,沒有任何限制。 立即下載並免費試用!

相關文章:

如何在Excel中刪除隱藏的工作表?

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (10)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Muchas gracias C:
This comment was minimized by the moderator on the site
I come to your site a lot. My company would not allow me to buy your kutools product, although I would like to! I appreciate that you show all the different ways to do things. You've helped me out a lot, and you seem to really understand Excel. I'm sure your tool product is awesome.
This comment was minimized by the moderator on the site
Hello, friend,
May be Kutools can help you to solve your problem quickly and save a lot of time for you, you can download and try with no limitation in 60 days. And we will try our best to make the product more powerful.
Thank you for your comment.
This comment was minimized by the moderator on the site
THANK YOU for that VBA snippet! Saved the DAY, my friend!!! :lol:
This comment was minimized by the moderator on the site
instructions for excel macros
This comment was minimized by the moderator on the site
Thanks! It works like a charm!
This comment was minimized by the moderator on the site
VBA code perfect, thanks.
This comment was minimized by the moderator on the site
Thanks! This is helpful! But it seems removing the hidden columns and rows are taking too long. Is that normal if there's a lot of data in the excel? Like say... 3000+ hidden rows or something? :D
This comment was minimized by the moderator on the site
This was very helpful, thanks!
This comment was minimized by the moderator on the site
Just wanted to say this really helped me! Thank you so much! :)
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations