Hello all,

I have an index of about 750 documents with each row being a different document and each column detailing different information about the document. The first column is the document number, which corresponds to the name of a pdf located on my server. I needed to insert hyperlinks to these documents, and did so with the following code I found on this forum:

sub makelinks()
For r = 10 To 750
Cells(r, 1).Formula = "=HYPERLINK(""S:\...\" & Cells(r, 1).Value & ".pdf"")"
Next r

end sub
This works, but does not look very neat on the page as there is no friendly name. I know that when you manually do a Hyperlink formula, you can insert a friendly name after a comma after the end of the Path name. I tried to do this here, with

sub makelinks()
For r = 10 To 750
Cells(r, 1).Formula = "=HYPERLINK(""S:\...\" & Cells(r, 1).Value & ".pdf"", "" & Cells(r,1).value)"
Next r

end sub
But this gives me a an error saying "expected end of statement". Same when I tired for something simpler like "Hyperlink" as the friendly name.

Any suggestions?

Thanks in advance!