Sathish KV
Active Member
Hi All,
The below procedure while executed gives you an input box to select range and upon selecting range and clicking ok it converts all the cells to hyperlink with cell's data
The below procedure while executed gives you an input box to select range and upon selecting range and clicking ok it converts all the cells to hyperlink with cell's data
Code:
Sub Convert_Path_To_Hyperlink2()
Dim oInpRng As Range
Dim rng As Range
On Error Resume Next
Set oInpRng = Application.InputBox("", "Select a Range", Type:=8)
Set rng = oInpRng
For Each cell In rng
cell.Select
If cell.Value <> "" Then
URL = cell.Value
ActiveSheet.Hyperlinks.Add Anchor:=cell, _
Address:=URL, TextToDisplay:=cell.Value
End If
Next
End Sub