vba,excel,網址提取名字與鏈接url
阿新 • • 發佈:2018-06-01
next 讀取 code true ESS AD ping 網址 brush
‘宏操作 Sub 復制超級鏈接() For a = 1 To 100 ‘這裏控制讀取A列的第1到10行,你根據自已的要求修改一下起始和結束行數 If Cells(a, 1).Hyperlinks.Count > 0 Then Cells(a, 2).Value = Cells(a, 1).Hyperlinks.Item(1).Name If Cells(a, 1).Hyperlinks.Count > 0 Then Cells(a, 3).Value = Cells(a, 1).Hyperlinks.Item(1).Address NextEnd Sub ‘自定義公式法 Function geturl(c As Range) As String geturl = c.Hyperlinks(1).Address End Function Function getname(c As Range) As String getname = c.Hyperlinks(1).Name End Function
vba,excel,網址提取名字與鏈接url