Forum Discussion
workbook and sheet name via formula
- Sep 18, 2020
Afraid for Excel Online that's only with Office Script, there are properties getName both for workbook and worksheet.
VBA and related functions don't work in Excel Online.
I guess the German translation wasn't too good. Try this:
=MID(CELL("filename",'Sheet1'!A2),FIND("]",CELL("filename",'Sheet1!A2))+1,99)
The MID() formula picks an extract from CELL("filename") starting at the FIND() position for the "]" and returning whatever is to the right. If you look at what =CELL('filename",<location>) returns it will help visualise.
The 99 at the end is a lazy parameter assuming there is no more than 99 characters after the "]" was found. It's probably safe but you can increase if you want to or make the formula more complicated by calculating the remaining length. I don't think the additional technical artistry helps understand the formula!
NuggetSA - nice simplification, 99 can be reduced to 32 as that is the maximum length of a sheet name. But this only works in the desktop version not the SharePoint or Web instance.