Hyperlink to Current Folder in Excel

Download Example Workbook

Download the example workbook

This tutorial will demonstrate how to create a hyperlink to the current folder in Excel.

hyperlink to current folder Main Sheet

Create Hyperlink to Current Folder

With the HYPERLINK function you can easily create a hyperlink to a folder. Its syntax is:

hyperlink Function

To hyperlink to the current folder we will use the following formula:

=HYPERLINK(LEFT(CELL("filename",B2),FIND("[",CELL("filename",B2))-1),"Current Folder")

hyperlink to current folder 1

Let’s see how this formula works.

CELL Function

We can use the CELL Function to return the file path, name, and sheet by inputting “filename”.

=CELL(“filename”,B2)

CELL

This function will always return the sheet name also together with the path and the file name in brackets. Let’s see how to remove the unnecessary parts to get only the path name.

FIND Function

First we determine the position of the opening bracket “[” before the file name with the FIND function.

=FIND("[",CELL("filename",B2))

FIND

LEFT Function

Once we have the position of the opening bracket “[” before the file name (i.e. the starting position of the unnecessary part), we can use it for passing it to the LEFT function to extract only the path name.

=LEFT(CELL("filename",B2),FIND("[",CELL("filename",B2))-1)

LEFT

HYPERLINK Function

And now we’ve got back to our original formula of

=HYPERLINK(E3,"Current Folder")

HYPERLINK