Extracting the hyperlink from multiple cells with VBA

后端 未结 1 627
我寻月下人不归
我寻月下人不归 2021-01-24 13:07

I want to iterate through a column, and extract each hyperlink to be used in the code (going to compare it to some text).

Any good pointers on how to do the extraction p

1条回答
  •  有刺的猬
    2021-01-24 13:57

    You can use the .Hyperlinks(1).Address to get the Hyperlinks

    For example this will extract the hyperlinks from A1 to A5

    Sub Sample()
        Dim i As Long
    
        For i = 1 To 5
            Debug.Print Range("A" & i).Hyperlinks(1).Address
        Next
    End Sub
    

    0 讨论(0)
提交回复
热议问题