How do I display the file name in the worksheet?
I want to display the file name in a cell in the workshett
|
How do I display the file name in the worksheet?
To get the full file name including file path, type =cell("filename")
"JKaz" wrote: I want to display the file name in a cell in the workshett |
How do I display the file name in the worksheet?
You will need to do some parsing to get the filename out, but this will give
you the whole reference of the path, filename and sheet =CELL("Filename") This give you just the filename =MID(CELL("Filename"),FIND("[",CELL("Filename"),1)+1,(FIND(".",CELL("Filename") ,1)+4)-(FIND("[",CELL("Filename"),1)+1)) (Beware the wrap above) -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk HIS "JKaz" wrote in message ... I want to display the file name in a cell in the workshett |
How do I display the file name in the worksheet?
No matter which of the suggested formulas you use, you'll be better off to
include a cell reference in those formulas: =cell("filename",a1) If you fail to include a cell reference, then when excel recalculates, the formula will evaluate using whatever worksheet/workbook is active. (You can see this by using two workbooks, arranging the windows (window|arrange) and putting: =cell("filename") in each window. Then look at the opposite window. JKaz wrote: I want to display the file name in a cell in the workshett -- Dave Peterson |
How do I display the file name in the worksheet?
Thanks! It Works! JKaz
"SVC" wrote: To get the full file name including file path, type =cell("filename") "JKaz" wrote: I want to display the file name in a cell in the workshett |
All times are GMT +1. The time now is 07:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com