View Single Post
  #1   Report Post  
Mebendazol Mebendazol is offline
Junior Member
 
Posts: 1
Default Insert Relative Hyperlinks in Exel cells?

I'm trying to use .xls file as index for 2000+ files

There will be a "Collection folder" that contains .xls index file and subfolder "Data" for all files

I make multi-level list (with subcategories), and the last filled column is for hyperlinks to files.

"Collection folder" is meant to be moved anywhere, and Index.xls must keep proper links - they must be relative.

I try to insert a formula into every cell of column, and cells will need to differ only in filenames, e.g.

=HYPERLINK("ThisWorkbook.Path/Data/Sun.pdf","OPEN")

This way I just need to insert [filename] instead of Sun.pdf in every cell.

But this doesn't work (error text: cannot open the specified file), because:

1) I use wrong syntax?
2) I use wrong function?
3) I use totally wrong approach, it's possible only through VBA or some other way...

Please, advise how to achieve the task