I created a UDF but I can't run the function ...

G

Guest

I created a UDF but I can't run the function. Do I have to save the function
under the worksheet or workbook or something else? Also, do I need the
Analysis toolpak - VBA to make the function work. The function is as follows:

Function GetHyperlinkAddress(Rng As Range) As String
With Rng
If .Hyperlinks.Count > 0 Then
GetHyperlinkAddress = .Hyperlinks(1).Address
End If
End With
End Function
 
T

Trevor Shuttleworth

Works for me:

=GetHyperlinkAddress(B1) on the worksheet.

I put it in a standard module. I've got the Analysis Pack but I don't think
you need it.

Regards

Trevor
 
G

Guest

if you are getting the #name error, it is not recognizing it as a function.
are you typing it in or using the function wizard to enter it in the cell?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top