跳到主要內容

如何在Excel中刪除或關閉超鏈接?

如果要刪除工作表或整個工作簿中存在的數百個超鏈接,或者在創建它們時直接將其關閉。 如何快速處理Excel中不需要的超鏈接?

doc刪除超鏈接1 doc刪除超鏈接2

使用“刪除超鏈接”命令刪除範圍內的所有超鏈接

如果超鏈接在同一工作表中,則可以使用 刪除超鏈接 功能刪除它們。

1。 選擇包含要刪除的超鏈接的範圍。

2。 然後點擊 首頁 > 重設 > 刪除超鏈接,請參見屏幕截圖:

doc刪除超鏈接3

保養竅門:您也可以右鍵單擊所選範圍,然後選擇 刪除超鏈接 從菜單中,查看屏幕截圖: doc刪除超鏈接4

3。 並立即刪除所選範圍內的所有超鏈接。

筆記:

  • 1.此方法不適用於Excel 2007和早期版本。
  • 2.如果必須刪除不同工作表中的超鏈接,請一次又一次重複操作。

使用VBA代碼刪除工作表中的所有超鏈接

如果您是熟練和專業的用戶,則可以創建宏以從活動工作表中刪除超鏈接。

1。 激活要從中刪除超鏈接的工作表。

2。 按住 ALT + F11 鍵以打開“ Microsoft Visual Basic應用程序”窗口。

3。 點擊 插入 > 模塊,然後將以下代碼粘貼到“模塊窗口”中。

VBA代碼:從活動工作表中刪除所有超鏈接:

Sub RemoveHyperlinks() 
ActiveSheet.Hyperlinks.Delete 
End Sub

4。 然後按 F5 鍵運行此代碼,所有超鏈接立即從活動工作表中刪除。


刪除所有超鏈接,而不會丟失VBA代碼的格式

刪除超鏈接時,上述所有方法都會清除單元格格式,如果要在刪除超鏈接時保留單元格格式,下面的代碼可能會對您有所幫助。 請執行以下操作:

1。 按住 ALT + F11 鍵以打開“ Microsoft Visual Basic應用程序”窗口。

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

VBA代碼:刪除所有超鏈接而不會丟失單元格格式:

Sub RemoveHlinkskeepformatting()
Dim Rng As Range
Dim WorkRng As Range
Dim TempRng As Range
Dim UsedRng As Range
Dim xLink As Hyperlink
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
Set UsedRng = Application.ActiveSheet.UsedRange
For Each xLink In WorkRng.Hyperlinks
    Set TempRng = Cells(1, UsedRng.Column + UsedRng.Columns.Count)
    Set Rng = xLink.Range
    Rng.Copy TempRng
    Rng.ClearHyperlinks
    Set TempRng = TempRng.Resize(Rng.Rows.Count, Rng.Columns.Count)
    TempRng.Copy
    Rng.PasteSpecial xlPasteFormats
    TempRng.Clear
Next
End Sub

3。 然後按 F5 鍵以運行此代碼,然後在提示框中選擇包含要刪除但保留格式的超鏈接的範圍,請參見屏幕截圖:

doc刪除超鏈接8

4。 然後,單擊 OK,超鏈接已被刪除,但超鏈接的格式(包括下劃線)得以保留。 查看屏幕截圖:

doc刪除超鏈接9 doc刪除超鏈接10

使用Kutools for Excel刪除範圍,工作表或工作簿中的所有超鏈接

假設您將要刪除超鏈接而不會丟失多個工作表或整個工作簿中的格式,那麼可以使用一個可用的工具 Excel的Kutools 一鍵刪除多個超鏈接。

安裝後 Excel的Kutools,套用 刪除超鏈接 按以下步驟操作:

點擊 庫工具 > Link > 刪除超鏈接而不會丟失格式, 然後根據需要選擇要從中刪除超鏈接的範圍。 看截圖:

然後,所有超鏈接都將被立即刪除,但文本格式將根據需要保留,請參見屏幕截圖:

立即下載和免費試用Excel的Kutools!


在Excel中關閉或禁用自動超鏈接

如果您需要禁用此煩人的操作,則當您輸入網址或電子郵件地址時,Excel會自動創建超鏈接。 請這樣做:

1。 在Excel 2010和更高版本中,單擊 文件 > 選項; 在Excel 2007中,單擊 辦公按鈕 > Excel選項 打開 Excel選項 對話。

2。 在 Excel選項 對話框,單擊 打樣 在左窗格中,然後單擊 自動更正選項 在右側部分。 看截圖:

doc刪除超鏈接6

3。 然後在彈出 自動更正 對話框中單擊 鍵入時自動套用 標籤,然後取消選中 具有超鏈接的Internet和網絡路徑 選項下 鍵入時替換 部分,請參見屏幕截圖:

doc刪除超鏈接7

4。 然後,點擊 OK > OK 關閉對話框。 現在,當在單元格中輸入網址時,按 Enter 鍵,互聯網地址將不會成為可點擊的超鏈接。

最佳辦公生產力工具

🤖 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 (17)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, thanks for the visual basic trick; I am not familiar with any programming, but this instruction was very clear and easy to follow. I still had to individually clear the icon in the cells, but at least hyperlinks were removed in one go. Thanks again!
This comment was minimized by the moderator on the site
Very much thankful to you, you made my task easy
This comment was minimized by the moderator on the site
Excel 2007 I struggled with all the above then found if you highlight the areas to remove the hyperlinks > look to where "Auto Sum" is and underneath you will find "Clear" select "clear formats" and bingo all done
This comment was minimized by the moderator on the site
i follow all steps. I and i did it. If you want to remove hyperlink in excel 2007. press alt + f8 select default macros and run Thankyou
This comment was minimized by the moderator on the site
Thank you so much! YOu saved me so much annoyance!
This comment was minimized by the moderator on the site
Thank you soo much, I hade to prepare a data for 270emp. and though its a big formula but got help and learnt new thing as well.
This comment was minimized by the moderator on the site
Love your easy to follow instructions! Worked like a charm!! Thank you very much. Saved me a lot of time removing hyperlinks individually. Normally, I'm quite computer illiterate but I was able to follow the macros instruction and I got excited that I have to make a comment. Thank you. This helped a ton!
This comment was minimized by the moderator on the site
just copy the entire row of data with hyperlinks on a notepad then select all and copy again from notepad select the first cell of the row and paste it.. wow..hyperlinks gone.... Note -- dont do it on Ms word...it carries the hyperlinks as well...
This comment was minimized by the moderator on the site
Pasting to notepad was a brilliantly simple suggestion, and I guess would work on all editions of Excel, which is not the case with all of the above methods as I and others have found out.
This comment was minimized by the moderator on the site
I downloaded - thinking that it would help on removing old hyperlinks to excels that no longer are valid. followed instructions above - came back "no hyperlinks found". When saved, closed and reopened, it had the same warnings that "Cant Connect to https://xxxxx". how else can I resolve. I have to go into 140+ worksheets to try and manually remove it this tool does not work.
This comment was minimized by the moderator on the site
Macro method is very useful and the second one which I always use is copy and paste the data in another sheet it loses the hyperlinks.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations