Fellow Forum Members,
Below is some code I tested with no success. My "Column A" header title is "PDFS". How do I get the code below to Hyperlink to list of PDF files in directory and match with Excel row entry in Column 1 ? Any help in tweaking the code below will be appreciated. By the way, can it be done with a formula? Again any help will be appreciated. Thanks.
Sub Create_Hyperlinks()
Dim folder As String
Dim DocID As Range
folder = "C:\Root\PDFS"
For Each PDFS In Range("A1", Cells(Rows.Count, "A").End(xlUp))
PDFS.Hyperlinks.Add Anchor:=PDFS, Address:=folder & PDFS.Value & ".pdf", TextToDisplay:=PDFS.Value
Next
End Sub