PC Gurus: Hyperlinks in Excel...?

I have a CD loaded with files organized in folders and sub-folders. Since many people need to borrow this disk to access documents, I have created an index using an Excel spreadsheet.

The question arose: Since my index shows the file name, can I make it a hyperlink so one can just quick on the link to launch the document right there and then? Perhaps a macro would allow me to do this?

I thought if there were to enter the exact path of the file, perhaps using html code, it will recognize the filename as a url? …Otherwise, it is very awkward and clumsy. If it matters at all, my documents are Word and Adobe files. There may be an occasional tif or jpg file. But, all files are all self-contained on this CD along with the index file.

Any suggestions or alternative possibilities appreciated.

  • Jinx

Select the cell and go to Insert…Link. If you record this as a macro you can probably work out how to automate it for large numbers of files.

Yup! That seems to do it! Excel has so many bells and whistles, the newer features tend to get lost in the mix…

Thanks,

  • Jinx

Oh, I like this idea so I wrote a little VBA Code. This assumes that all links are in the A Column and have the full path to the file name in the cell. You can easily modify the code depending on where your links are and how they are formatted.



Dim i As Integer
For i = 1 To 27 'For Cells A1 to A27, adjust for more or less

    Range("A" & i).Select
    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
        Range("A" & i).Text, TextToDisplay:=Range("A" & i).Text
        
Next