View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Workbook Name in Cell

With the book saved beforehand
In any cell, in any sheet:
=TRIM(SUBSTITUTE(MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1),".xls",""))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,700 Files:359 Subscribers:55
xdemechanik
---
"RoadKill" wrote:
I found that you can do a sheet name to display in a cell, but can you do the
same with the workbook name?

For example, if the workbook is named Jabroni Johnson.xls then cell A1 of
Sheet1 in that workbook should also display Jabroni Johnson.