Insert FileName Into a Cell

Automate Excel

Insert FileName Into a Cell

A formula to insert the filename of the workbook in a cell:

=MID(CELL(”filename”,A1),FIND(”[",CELL("filename",A1))+1,FIND("]“,
CELL(”filename”,A1))-FIND(”[”,CELL(”filename”,A1))-1)

Note: Remove the line break from the formula in Excel.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.