跳到主要内容

如何在Excel中删除或关闭超链接?

如果要删除工作表或整个工作簿中存在的数百个超链接,或者在创建它们时直接将其关闭。 如何快速处理Excel中不需要的超链接?

doc删除超链接1 doc删除超链接2

使用“删除超链接”命令删除范围内的所有超链接

如果超链接在同一工作表中,则可以使用 删除超链接 功能删除它们。

1。 选择包含要删除的超链接的范围。

2。 然后点击 主页 > 清除 > 删除超链接,请参见屏幕截图:

doc删除超链接3

Tips:您也可以右键单击所选范围,然后选择 删除超链接 从菜单中,查看屏幕截图: 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 删除范围、工作表或工作簿中的所有超链接

假设您将要删除超链接而不会丢失多个工作表或整个工作簿中的格式,那么可以使用一个可用的工具 Kutools for Excel 一键删除多个超链接。

安装后 Kutools for Excel,套用 删除超链接 按以下步骤操作:

点击 库工具 > 链接 > 删除超链接而不会丢失格式, 然后根据需要选择要从中删除超链接的范围。 看截图:

然后,所有超链接都将被立即删除,但文本格式将根据需要保留,请参见屏幕截图:

立即下载和免费试用Excel的Kutools!


在Excel中关闭或禁用自动超链接

如果您需要禁用此烦人的操作,则当您输入网址或电子邮件地址时,Excel会自动创建超链接。 请这样做:

1。 在Excel 2010和更高版本中,单击 文件 > 附加选项; 在Excel 2007中,单击 办公按钮 > Excel选项 打开 Excel选项 对话。

2。 在 Excel选项 对话框,单击 打样 在左窗格中,然后单击 自动更正选项 在右侧部分。 看截图:

doc删除超链接6

3。 然后在弹出 自动更正 对话框中,单击 键入时自动套用 标签,然后取消选中 具有超链接的Internet和网络路径 选项下 键入时替换 部分,请参见屏幕截图:

doc删除超链接7

4。 然后,点击 OK > OK 关闭对话框。 现在,当在单元格中输入网址时,按 输入 键,互联网地址将不会成为可点击的超链接。

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 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