Formula to open current folder one level up

ttratl

Board Regular
Joined
Dec 21, 2004
Messages
168
Hi Everyone,

I have this formula that opens the current folder where my file is stored:

=HYPERLINK(MID(CELL("filename"),1,FIND("[",CELL("filename"))-1),"Open Current Folder")

This works fine. I'd like it to open the folder one level up from the current folder, but I really don't understand formulas well enough to know if this is even possible.

Any ideas?

Thanks
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Try this:
Code:
=HYPERLINK(MID(CELL("filename"),1,FIND("[",CELL("filename"))-1)&"..","Open Current Folder")
HTH
 
Upvote 0
That's really cool rorya.

I thought it was going to involve a complex find/substitute/len to get the 2nd to last "/" and such...
 
Upvote 0
So did I, then I had a DOS flashback! :)
 
Upvote 0
Hmm, You're formula got me thinking Rorya....

now you're gonna have a laugh at this...

Try this..

=HYPERLINK(".","Hello") = Current folder
=HYPERLINK("..","Hello") = One folder up
 
Upvote 0
=HYPERLINK("..\..","Hello") = Two folders up
=HYPERLINK("..\..\..","Hello") = Three Folders up

you can just go on and on....Sweet..
 
Upvote 0
o_O How did I not see that?? Nice one.
:rolleyes:
 
Upvote 0
I wonder if there's any way to use that method to return the TEXT string of that path so you could use it in a formula ? That sure would be easier than the find/substitute/len method on the nth "\"
 
Upvote 0
I wonder if there's any way to use that method to return the TEXT string of that path so you could use it in a formula ? That sure would be easier than the find/substitute/len method on the nth "\"

Nevermind, what I thought had wasn't actually the directory I was looking at.

Sorry.
 
Upvote 0

Forum statistics

Threads
1,215,540
Messages
6,125,409
Members
449,223
Latest member
Narrian

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