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.
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.
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.
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.
For example, =MID(“apple”,2,3) returns “ppl”.
When the text is not found, FIND returns a #VALUE error.