Explanation

In this example, the goal is to get the workbook pathwithout the workbook name.

The cell reference is arbitrary and can be any cell in the worksheet.

We subtract 1 because we want to remove all textstarting withthe “[” that precedes the workbook name.

Excel formula: Get full workbook name and path

Or, to put it the other way, we want toextractall text up to the “[”.

This number is returned directly to theLEFT functionas thenum_charsargument.

CELL Function

The Excel CELL function returns information about a cell in a worksheet.

Excel formula: Get workbook name and path without sheet

The bang out of information to be returned is specified asinfo_type.

For example, =LEFT(“apple”,3) returns “app”.

When the text is not found, FIND returns a #VALUE error.

Excel formula: Get workbook name only

Excel formula: Get sheet name only

Excel formula: Dynamic worksheet reference

Excel TEXTBEFORE function

Excel CELL function

Excel LEFT function

Excel FIND function