Excel inserting the file name

%3CLINGO-SUB%20id%3D%22lingo-sub-1615649%22%20slang%3D%22en-US%22%3EExcel%20inserting%20the%20file%20name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1615649%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20using%20Microsoft%20365%20excel%20for%20my%20school.%26nbsp%3B%20I%20have%20tried%20to%20put%20the%20name%20of%20the%20file%20into%20a%20cell%20in%20the%20sheet.%26nbsp%3B%20Example%3A%20I%20make%20the%20file%20name%20Edward%20and%20I%20want%20to%20see%20Edward%20in%20the%20cell%20of%20a%26nbsp%3B%20sheet%20where%20it%20says%20student%20name.%26nbsp%3B%20I%20used%20the%20recommended%20formula%20to%20do%20this.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CH2%20id%3D%22toc-hId--1272242254%22%20id%3D%22toc-hId--1272242228%22%20id%3D%22toc-hId--1272242228%22%20id%3D%22toc-hId--1272242228%22%20id%3D%22toc-hId--1272242228%22%20id%3D%22toc-hId--1272242228%22%20id%3D%22toc-hId--1272242228%22%3E%3CSPAN%3E%3DMID(CELL(%22filename%22)%2CSEARCH(%22%5B%22%2CCELL(%22filename%22))%2B1%2C%20SEARCH(%22%5D%22%2CCELL(%22filename%22))-SEARCH(%22%5B%22%2CCELL(%22filename%22))-1)%3C%2FSPAN%3E%3C%2FH2%3E%3CP%3E%3CSPAN%3EI%20continue%20to%20get%20the%20%23value%20error%20message%20even%20after%20I%20close%20out%20or%20refresh%20the%20screen.%26nbsp%3B%20I%20have%20tried%20saving%20the%20file%20as%20a%20different%20name.%26nbsp%3B%20That%20did%20not%20work.%26nbsp%3B%20Does%20it%20have%20something%20to%20do%20with%20the%20automatic%20save%20function%20in%20excel%20365%3F%26nbsp%3B%20Any%20advice%20on%20how%20to%20make%20this%20work%20would%20be%20appreciated.%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1615649%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1615704%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20inserting%20the%20file%20name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1615704%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F773013%22%20target%3D%22_blank%22%3E%40edwardyauger%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20you%20tried%20with%20another%20workbook%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1615755%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20inserting%20the%20file%20name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1615755%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3E%3CBR%20%2F%3EDo%20check%20the%20link%20for%20solution%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Finsert-the-current-excel-file-name-path-or-worksheet-in-a-cell-186833c6-c899-4912-a14c-240c2eb51e0b%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Finsert-the-current-excel-file-name-path-or-worksheet-in-a-cell-186833c6-c899-4912-a14c-240c2eb51e0b%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3ECheers%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1615966%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20inserting%20the%20file%20name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1615966%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F773013%22%20target%3D%22_blank%22%3E%40edwardyauger%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20general%20formula%20works%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20689px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F215002i9905CD419F2EEA28%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EYou%20may%20open%20attached%20file%20and%20check%20if%20it%20is%20transformed%20to%20your%20locale.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1618527%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20inserting%20the%20file%20name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1618527%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F622486%22%20target%3D%22_blank%22%3E%40wumolad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%2C%20I%20used%20it%20on%20my%20excel%20for%20personal%20use%20and%20it%20worked%20fine.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1618529%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20inserting%20the%20file%20name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1618529%22%20slang%3D%22en-US%22%3Ethanks.%20that%20is%20where%20I%20looked%20the%20last%20time%2C%20but%20maybe%20I%20just%20didn't%20follow%20the%20directions%20correctly.%3C%2FLINGO-BODY%3E
Highlighted
New 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
Highlighted

@edwardyauger 

 

Have you tried with another workbook?

Highlighted
Highlighted

@edwardyauger 

In general formula works

image.png

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

Highlighted

@wumolad 

 

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

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