Is it possible to set a cell equal the the file name of the Excel file?
I know you can set it equal to the full path but I want the file name only!
Thanks, Ben
Is it possible to set a cell equal the the file name of the Excel file?
I know you can set it equal to the full path but I want the file name only!
Thanks, Ben
Try this:
=MID(CELL("FILENAME",F10),FIND("[",CELL("FILENAME",F10))+1,FIND("]",CELL("FILENAME",F10))-FIND("[",CELL("FILENAME",F10))-1)
Rule 1: Never merge cells
Rule 2: See rule 1
"Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".
Wow........thanks Dave.
Is it possible to get rid of the '.xls' too?
Cheers, Ben
Yes,
but this will only work for .xls files - not .xlsx or .xlsm
=SUBSTITUTE(MID(CELL("FILENAME",F10),FIND("[",CELL("FILENAME",F10))+1,FIND("]",CELL("FILENAME",F10))-FIND("[",CELL("FILENAME",F10))-1),".xls","")
That's OK.
Thanks again for you help.
Ben
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks