SOLVED

Insert current file name only

Copper Contributor

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?

2 Replies
best response confirmed by eddymalcs (Copper Contributor)
Solution

@eddymalcs Perhaps like this?

 

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

 

Thank you, that works well.
1 best response

Accepted Solutions
best response confirmed by eddymalcs (Copper Contributor)
Solution

@eddymalcs Perhaps like this?

 

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

 

View solution in original post