Try this...
Formula:
=REPLACE(REPLACE(CELL("filename",A1),1,FIND("[",CELL("filename",A1)),""),FIND(".",REPLACE(CELL("filename",A1),1,FIND("[",CELL("filename",A1)),"")),255,"")
If you are saving the current formula file to new file then once you saved it with new name just press F2 and enter OR if you do any change in any of that workbook cell will get the current file name.
For 2003 use the below formula to get the file name and the notification message for unsaved workbook
Formula:
=IF(ISERR(REPLACE(REPLACE(CELL("filename",A1),1,FIND("[",CELL("filename",A1)),""),FIND(".",REPLACE(CELL("filename",A1),1,FIND("[",CELL("filename",A1)),"")),255,"")),"File Not Saved",REPLACE(REPLACE(CELL("filename",A1),1,FIND("[",CELL("filename",A1)),""),FIND(".",REPLACE(CELL("filename",A1),1,FIND("[",CELL("filename",A1)),"")),255,""))
For 2007 use the below formula to get the file name and the notification message for unsaved workbook
Formula:
=IFERROR(REPLACE(REPLACE(CELL("filename",A1),1,FIND("[",CELL("filename",A1)),""),FIND(".",REPLACE(CELL("filename",A1),1,FIND("[",CELL("filename",A1)),"")),255,""),"File Not Saved")
Hope that helps!
---
Sixthsense
Bookmarks