提取网址
在采集的时候,我们需要一个标题跟网址,很多采集的码都含有链接跟文字了,直接复制到EXCEL里,再执行以下的VBA就轻松取得需要采集的地址了:
在EXCEL里按Alt+F11
,插入模块,输入
Function GetActAddress(HlinkCell)
Application.Volatile True
With HlinkCell.Hyperlinks(1)
GetActAddress = IIf(.Address = "", .SubAddress, .Address)
End With
End Function
使得的时候,在单元格中输入:
=GetActAddress(A1)
如下图: