Forum Discussion
KenTreanor
Feb 10, 2023Copper Contributor
showing file names in Excelworkbooks
It used to be possible to insert a formula into an Excel workbook which would show the file name and path. Can anyone remember what the formula was is it still valid as I can't find it in the formulas tab?
1 Reply
=CELL("filename") returns path+filename+sheetname
To remove the sheet name:
=SUBSTITUTE(LEFT(CELL("filename"),FIND("]",CELL("filename"))-1),"[","")
Warning: this won't work if the path/filename contains [ or ].