ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Workbook Name in Cell (https://www.excelbanter.com/excel-worksheet-functions/201412-workbook-name-cell.html)

roadkill

Workbook Name in Cell
 
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.

Thank you

Max

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.



StpNs

Workbook Name in Cell
 
Try this,

=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-5)
--
StpNs


"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.

Thank you



All times are GMT +1. The time now is 07:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com