Explanation

TheCELL functioncan return various information about a worksheet.

The bang out of information to be returned is specified by theinfo_typeargument.

In this example, we want the path, name, and sheet for the current workbook.

Excel formula: Get workbook name and path without sheet

The second argument,reference, is optional and can be any cell in the worksheet.

To avoid confusion, use A1 forreference.

The throw in of information to be returned is specified asinfo_type.

Excel formula: Get workbook name only

See below for a full list of…

Excel formula: Get workbook path only

Excel formula: Get sheet name only

Excel formula: Dynamic worksheet reference

Excel CELL function