Excel inserting the file name

Copper Contributor

I am using Microsoft 365 excel for my school.  I have tried to put the name of the file into a cell in the sheet.  Example: I make the file name Edward and I want to see Edward in the cell of a  sheet where it says student name.  I used the recommended formula to do this.  

=MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1)

I continue to get the #value error message even after I close out or refresh the screen.  I have tried saving the file as a different name.  That did not work.  Does it have something to do with the automatic save function in excel 365?  Any advice on how to make this work would be appreciated.  

5 Replies

@edwardyauger 

 

Have you tried with another workbook?

@edwardyauger 

In general formula works

image.png

You may open attached file and check if it is transformed to your locale.

@wumolad 

 

Yes, I used it on my excel for personal use and it worked fine. 

thanks. that is where I looked the last time, but maybe I just didn't follow the directions correctly.