excel批量提取超链接中的地址
时间:2023-06-20 18:47:58
如果Excel表格单元格中包含有许多用文本形式显示的超链接,如“给我发邮件”、“访问我的网站”等,要逐一查看所有超链接的地址,用手工的方法显得太繁琐,我们可以用自定义函数来批量提取这些超链接中的地址,将下列代码插入到标准模块中:
Function GetURL(rng As Range) As String
On Error Resume Next
GetURL = rng.Hyperlinks(1).Address
End Function
使用方法是在单元格中输入公式,假如单元格D6中含有超链接:
=geturl(D6)
还可以使用下面的代码将工作表中的所有超链接地址全部显示出来,运行代码前先备份工作簿,因为它会在含有超链接的单元格的右侧显示其地址,有可能会破坏工作表结构。
Sub ExtractHL()
Dim HL As Hyperlink
For Each HL In ActiveSheet.Hyperlinks
HL.Range.Offset(0, 1).Value = HL.Address
Next
End Sub
标签:代码,单元格,地址,超链接,Excel函数
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
滴滴看呆!神州专车向社会车辆开放 永不抽成
2022-08-07 00:35:06
![](https://img.aspxhome.com/file/2023/2/a285991_0s.jpg)
txt怎么转换成pdf格式 txt转换成pdf格式图文教程
2023-08-03 08:13:48
![](https://img.aspxhome.com/file/2023/1/15601_0s.jpg)
传闻Windows10系统将改回一年一更新
2023-05-26 08:09:00
![](https://img.aspxhome.com/file/2023/3/a293830_0s.jpg)
Win7系统电脑打开图片时提示COM Surrogate已停止工作怎么办
2023-06-08 14:04:10
![](https://img.aspxhome.com/file/2023/3/a294999_0s.jpg)
用excel进行解方程的方法步骤
2022-01-27 11:01:20
排序多列:播放Excel数据(05)
2023-10-05 20:49:58
![](https://img.aspxhome.com/file/2023/9/a143069_0s.jpg)
wps翻译功能怎么用
2023-03-27 15:58:08
![](https://img.aspxhome.com/file/2023/1/a168741_0s.png)
炫龙DD3笔记本怎么安装win7系统 利用U盘安装win7图文教程
2023-03-25 04:32:36
![](https://img.aspxhome.com/file/2023/5/a318545_0s.jpg)
wps如何计算除法
2023-11-27 23:44:15
Win10 Mobile 10512安卓应用不能弹键盘该怎么办?
2022-12-25 15:32:47
![](https://img.aspxhome.com/file/2023/28/a248219_0s.jpg)
win10键盘打不出字怎么回事_win10无法打字语言栏没了的解决办法
2022-01-24 15:23:24
![](https://img.aspxhome.com/file/2023/3/a299718_0s.jpg)
win10商店怎么换中文?win10商店设置中文教程?
2023-09-11 18:25:27
![](https://img.aspxhome.com/file/2023/9/47269_0s.jpg)
win10 build 9879中文专业版镜像官方下载地址(32位/64位)
2023-09-14 11:49:21
![](https://img.aspxhome.com/file/2023/29/a252914_0s.png)
WPS演示怎样将多页幻灯片打印到一张纸上
2023-08-30 06:24:13
excel能量千焦和千卡换算表怎么制作?
2022-10-15 05:41:24
![](https://img.aspxhome.com/file/2023/1/40171_0s.jpg)
Win7系统下禁止在桌面上创建文件夹的方法
2022-07-29 01:48:32
![](https://img.aspxhome.com/file/2023/28/a250824_0s.jpg)
WPS文字怎么给重要段落加边框图文教程
2022-10-06 08:48:02
Win10开始菜单透明度如何设置?Win10开始菜单透明度设置教程
2022-06-16 13:55:24
![](https://img.aspxhome.com/file/2023/26/a220029_0s.png)
wps表格分页符怎么用图解
2022-12-06 22:53:45
IE浏览器提示运行时间错误的解决方法
2022-10-28 09:21:17
![](https://img.aspxhome.com/file/2023/2/a284516_0s.jpg)