One of Excel's most useful features is that it allows users to create custom formulas to perform calculations on their data. Excel also contains built-in formulas called functions that make it easy to perform common calculations on data.
Excel's CELL function comes close. The following formula displays the workbook's full path along with the worksheet name:
=CELL("filename")
For example, this formula might return something like:
D:\Users\IT.TANFAC\Documents\[test.xlsx]Sheet1
Returning only the sheet name requires a more complex formula:
=MID(CELL("filename"), FIND("]",CELL("filename"))+1, LEN(CELL("filename"))-FIND("]", CELL("filename")))