Exceljet

Quick, clean, and to the point

Get full workbook name and path

Excel formula: Get full workbook name and path
Generic formula 
=CELL("filename",A1)
Summary 

To get the current workbook's full path, name, and sheet with a formula, you can use the CELL function and a reference to any cell in the workbook. In the example shown, the formula is:

=CELL("filename",A1)

Note that you must save the worksheet in order to get the a result.

Explanation 

The CELL function can return various information about a worksheet. CELL can get things like address and filename, as well as detailed info about the formatting used in the cell. The type of information to be returned is specified by  the info_type argument. 

In this example, we want the path, name, and sheet for the current workbook. To get this information, the info_type argument is set to "reference" in a formula like this:

=CELL("filename",A1)

The second argument, reference, is optional and  can be any cell in the worksheet.  If reference is not supplied, CELL will return the name of the current "active sheet" which may or may not be the sheet where the formula exists, and might even be in a different workbook. To eliminate confusion, supply A1 for reference.

CELL will return the name in this format:

path[workbook.xlsx]sheetname

Note that you must save the worksheet in order to get the a result. 

Author 
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 200+ Excel Shortcuts

Get over 200 Excel shortcuts for Windows and Mac in one handy PDF.