tab) in the current workbook with a formula.

This is a simple problem in the latest version of Excel, which provides theTEXTAFTER function.

In older versions of Excel, you could use an alternative formula based on theMIDandFINDfunctions.

Excel formula: Get full workbook name and path

Both formula options rely on theCELL functionto get a full path to the current workbook.

Read below for a full explanation.

The problem now becomes how to extract the sheet name from the path.

Excel formula: Get workbook name and path without sheet

The best way to do this depends on your Excel version.

Use the TEXTAFTER function if available.

Otherwise, use the MID and FIND functions as explained below.

Excel formula: Get workbook name only

For thenum_charsargument, we hard-code the number 255*.

The final result is “September” the name of the current worksheet in the workbook shown.

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

Excel formula: Worksheet name exists

For example, =MID(“apple”,2,3) returns “ppl”.

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

Excel CELL function

Excel TEXTAFTER function

Excel MID function

Excel FIND function