Quick, clean, and to the point

Get workbook name and path without sheet

Generic formula 
=SUBSTITUTE( LEFT(CELL("filename",A1),FIND("]",CELL("filename",A1))-1),"[","")

If you want to get the current workbook's full name and path without a sheet name, you can use a formula that employs several text functions to strip off the sheet name. The final result will be a text string that looks like this:


The CELL function is used with "filename" to get the full workbook name and path:


The result is a full path that looks like this:


The LEFT function receives the full path as text, along with the the location of square bracket "]" (minus 1) which is calculated by the find function:


With these arguments, LEFT effectively strips off the sheet name out of the path. However, the left square bracket "]" remains:


The final function, SUBSTITUTE, removes the "]" by replacing it with an empty string ("").

Dave Bruns

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.

Download 100+ Important Excel Functions

Get over 100 Excel Functions you should know in one handy PDF.