Function getURLS(cel As String, x As Long)
Dim i As Long, mesliens As Object
With CreateObject("htmlfile")
.body.innerhtml = cel
Set mesliens = .getelementsbytagname("A")
ReDim t(1 To mesliens.Length + 10)
For i = 0 To mesliens.Length - 1
t(i + 1) = mesliens(i).href
If i = x - 1 Then getURLS = mesliens(i).href: Exit For
Next
End With
End Function
Sub test()
MsgBox getURLS([A1].Value, 1)
End Sub