View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
NAHolmes NAHolmes is offline
external usenet poster
 
Posts: 5
Default Display file name without the file type extension

This also worked, again - many thanks.

"JLatham" wrote:

Try this:
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-6)

Keep in mind that the "filename" used with CELL() does not return anything
until the workbook has been saved.

or if you definitely know that the filename ends with .xlsx (and not .xlsm
or other Excel 2007 file type identifier), then this would work:
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND(".xlsx]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)


"NAHolmes" wrote:

Is it possible to return the file name value to a cell without the '.xlsx'?

Thanks.