Forum Discussion
update Excel File Name (Rename an Excel Sheet), and it auto updates a specific cell in the workbook
Budman36 It sounds like you want the filename in a cell. The function CELL() offers that sort of. CELL("filename") actually gives the full path/reference but with some additional work you can have it trim just the filename out:
=LET(path,CELL("filename"),start,SEARCH("[",path)+1,end,SEARCH("]",path),fn,MID(path,start,end-start),fn)
if you don't have the newest version of Excel with the LET() function you can use:
=MID(CELL("filename"),SEARCH("[",CELL("filename"))+1,SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1)
but maybe the full path would be even better for you?
mtarler This worked very well, on a local drive, personal computers, etc., but it doesn't work when uploaded to sharepoint? Any ideas?
- SergeiBaklanFeb 03, 2021Diamond Contributor
CELL("filename") is not implemented for Excel Online
- Budman361530Feb 03, 2021Brass Contributor
SergeiBaklan That would do it! Do you know a workaround?
- SergeiBaklanFeb 03, 2021Diamond Contributor
You may vote for this idea here CELL function added to online – Welcome to Excel’s Suggestion Box! (uservoice.com)
As for the rest I agree with mtarler , it all very depends on concrete scenario how do you work with file.