Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How can I show the current file name in a cell.
How do you get excel to return the name of the current workbook into a
certain cell. I can get the directory name by typing =Info("directory"), but I cannot get the filename. Is there a function that will return the current file name. Thanks |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How can I show the current file name in a cell.
Try one of these** :
This will return the full path including the sheet name: =CELL("filename",A1) Result will be something like: C:\TV\[Sheet name.xls]Sheet1 This will return just the file name including the file extension: =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1) Result will be something like: Sheet name.xls ** the file must already exist. In other words, it must have been saved at least once and given a file name. -- Biff Microsoft Excel MVP "Patrick" wrote in message ... How do you get excel to return the name of the current workbook into a certain cell. I can get the directory name by typing =Info("directory"), but I cannot get the filename. Is there a function that will return the current file name. Thanks |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How can I show the current file name in a cell.
Perhaps have a look at
http://spreadsheetpage.com/index.php...vba_functions/ Success! -- met vriendelijke groetjes "Patrick" schreef in bericht ... How do you get excel to return the name of the current workbook into a certain cell. I can get the directory name by typing =Info("directory"), but I cannot get the filename. Is there a function that will return the current file name. Thanks |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How can I show the current file name in a cell.
hi, Patrick !
How do you get excel to return the name of the current workbook into a certain cell. I can get the directory name by typing =Info("directory"), but I cannot get the filename. Is there a function that will return the current file name. for the current (and saved) workbook... path: =left(cell("filename"),find("[",cell("filename"))-2) name: =mid(cell("filename"),find("[",cell("filename"))+1,find("]",cell("filename"))-find("[",cell("filename"))-5) sheet: =mid(cell("filename"),search("]",cell("filename"))+1,now()) when the workbook has only one sheet names same as the workbook... sheet: =mid(cell("filename"),if(iserror(find("]",cell("filename"))),lookup(2,1/(mid(cell("filename"),row($1:$255),1)="\"),row($1: $255))+1,find("]",cell("filename"))+1),31) hth, hector. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formatting cell to show current Quarter | Excel Worksheet Functions | |||
How do i assign cell A1 to show the current cursor cell in Excel? | Excel Discussion (Misc queries) | |||
Show current date in cell | Excel Discussion (Misc queries) | |||
I want a cell to show the current filename automatically. | Excel Discussion (Misc queries) | |||
how do i insert the current time into a cell, and show different . | Excel Discussion (Misc queries) |