Pasting a value as an hyperlink

T

The Rook

I have imported a list from a database of file paths to documents on our
server, these data is currently formatted as 'General'

Is there anyway of converting that value into a hyperlink to the said
documents?
 
P

Pete_UK

If your list is the complete path and file name, then in an adjacent
column you could just do:

=HYPERLINK(A1)

and copy this down.

If you wish to you could fix the values and then you would not need
column A.

Hope this helps.

Pete
 
G

Gary Brown

Select the range that you want to make into hyperlinks and use this macro.
'/==============================/
Sub HyperlinkMake()
'create hyperlink from cell contents
'Gary Brown - Kinneson LLC
'07/07/2005
Dim rngCell As Range

On Error Resume Next

'if no cells have been selected then stop
If Selection.Count = 0 Then
GoTo err_Sub
End If

For Each rngCell In Selection
'check that selection is within used range of worksheet
If TypeName(Application.Intersect(rngCell, _
(ActiveSheet.UsedRange))) = "Nothing" Then
Exit For
End If
If rngCell.Hyperlinks.Count = 0 And _
Len(rngCell.value) <> 0 Then
ActiveSheet.Hyperlinks.Add _
Anchor:=rngCell, Address:= _
rngCell.value, TextToDisplay:=rngCell.value
End If
Next rngCell


exit_Sub:
Exit Sub
err_Sub:
GoTo exit_Sub

End Sub
'/==============================/
 

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