• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Convert path in excel cells to Hyperlink

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

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
 
Top