Hello amrinderminhas
If I understand what you are after and a VBA solution will suffice, you could try a macro like this
Code:
Sub Assign_Hyperlinks()
'http://www.excelguru.ca/forums/showthread.php?2837
Dim rng As Range
Dim cel As Range
Dim LastRow As Long
Dim Path As String
Dim FileName As String
With Sheet1
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
Set rng = Range("A2:A" & LastRow)
Path = "D:\New folder" '<-- put your directory here
If Right(Path, 1) <> Application.PathSeparator Then 'if path doesn't end in "\"
Path = Path & Application.PathSeparator 'add "\"
End If
For Each cel In rng
FileName = Dir(Path & cel.Value & ".*", vbNormal)
If FileName <> "" Then cel.Hyperlinks.Add anchor:=cel, Address:=Path & FileName
Next cel
End With
End Sub
Hope that helps
Good luck
NoS
Bookmarks