Month: December 2015

Excel filenames and worksheet names as a formula

=CELL(“filename”) can be used to return the full file path in square brackets plus the worksheet name, so you can manipulate this with the MID and FIND functions to just return the folder location or the filename.     Folder location: =MID(CELL(“filename”),1,FIND(“[“,CELL(“filename”))-1) Filename: =MID(CELL(“filename”),FIND(“[“,CELL(“filename”))+1,FIND(“]”,CELL(“filename”))-FIND(“[“,CELL(“filename”))-1) Full file location: =A2 & A5   Returning the Worksheet Name Read More …