Forum Discussion
eddymalcs
Feb 24, 2022Copper Contributor
Insert current file name only
I am using the formula
=MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1)
to insert the file name into a cell.
I would like this to work without inserting the .xlsx suffix. How can this formula be modified to achieve that please?
eddymalcs Perhaps like this?
=SUBSTITUTE(MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1),".xlsx","")
2 Replies
- Riny_van_EekelenPlatinum Contributor
eddymalcs Perhaps like this?
=SUBSTITUTE(MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1),".xlsx","")- eddymalcsCopper ContributorThank you, that works well.