Insert File name via an array formula

Copper Contributor

I've just discovered this tool, fantastic.

 

BUT, can the field be amended to remove the file extension?  I want to use the field within a report as the document reference, but without the .xlsx

Thanks

2 Replies

@SuzanH , do you mean this https://support.office.com/en-ie/article/insert-the-current-excel-file-name-path-or-worksheet-in-a-c... formula?

 

It returns something like path\[filename.xlsx]Sheet1 and you'd like path\[filename]Sheet1, correct?

This formula returns the file name without the file extension:
=MID(CELL("filename",A1),
FIND("[",CELL("filename",A1))+1,
FIND(".x",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)