Saturday, 1 August 2015

Formula to link all the File Names in Excel.

Formula to link all the File Names in Excel:


You have the list of file-names,  and you want to link all the files to their destined path so that you can easily explore it just by clicking file-name on Excel Sheet instead always go to destined path and check file from there.

Here is the simple way,

Example: Below Image shows the list of file-name (which is static) in excel sheet (Sheet1) and what we want is when we click the file name , it opens from the destined path ("C:\sample"):




Here is the formula ,

=HYPERLINK("C:"&"\sample"&"\"&Sheet1!A2&".txt",Sheet1!A2) , drag down formula in sheet 2 and when you click it , i will open the file like below image.




Formula Explanation: 
  • HYPERLINK(link_location,[friendly_name])  >>> 
  1. Link_location is link to the destined path which is  -"C:"&"\sample"&"\"&Sheet1!A2&".txt"    >>> means Concatenate Destined path (you can also use Concatenate function) .
  2. [friendly_name] >>> Name which you want to give and it will display in the cell. If ignore, the it will show the file path address (Example: C:\sample\1.txt). But if you define like we define Sheet1!A2, which shows file-name as shown in image above.



Thank You!!
Have a Nice Day !!





No comments:

Post a Comment