Q:
Hi,
Can you tell me how to show the worksheet name in a cell in my workbook?
Thanks,
Ted
A:
Ted,
You can do this with the built in functions in Excel. The CELL function with the filename argument, =cell(”filename”), will return the entire path of your workbook along with your current worksheet. We can then extract the worksheet name by using the additional functions MID, FIND and LEN. The formula below will return just the worksheet name:
=MID(CELL(”filename”), FIND(”]”,CELL(”filename”))+1, LEN(CELL(”filename”))-FIND(”]”, CELL(”filename”)))
This can be very useful when setting up templates or for writing formulas that refer to other sheets.
Keep those questions coming in!
Joseph Harris
ExcelYogi.com
Related posts:
- Excel CELL () Function The CELL function can be used to find out information...
- Removing Macros from a Workbook Q: How do I remove all the macros from my...










[...] that is often used in conjunction with other functions to do some very interesting things. In this articles we talk about using the cell function to return the workbook name. [...]