Folder Paths HyperLink

lcorcoran

New Member
Joined
Nov 4, 2021
Messages
15
Office Version
  1. 365
Hi all,

I'm getting a list of folder Paths using PowerQuery, when I send to table to excel, I want the paths to be a clickable link to open the folder.
I tried using this formula "=HyperLink([@[Folder Path]],[@Name])" but all it's returning is "#REF!" error.
Any help would be much appreciated
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
You can't do that as you've seen. Your best bet is to have a macro that will open a folder in the active cell:
VBA Code:
Sub OpenFolder()

Dim strFolder As String
strFolder = ActiveCell.Value

Shell "explorer.exe " & strFolder, vbNormalFocus

End Sub
In testing it I found that it worked with or without a trailing backslash.
Know that I am not a fan of VBA, but this is an instance where it is needed.
 
Upvote 0
You can't do that as you've seen. Your best bet is to have a macro that will open a folder in the active cell:
VBA Code:
Sub OpenFolder()

Dim strFolder As String
strFolder = ActiveCell.Value

Shell "explorer.exe " & strFolder, vbNormalFocus

End Sub
In testing it I found that it worked with or without a trailing backslash.
Know that I am not a fan of VBA, but this is an instance where it is needed.
Hi Thanks for the reply, I was going down the road of the VBA, but I tried it on a second workbook and it worked for me in that file, not sure why I was getting the error in the first file, the formula is the same
 
Upvote 0

Forum statistics

Threads
1,223,953
Messages
6,175,598
Members
452,658
Latest member
GStorm

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top