Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
try one of the following formulas (note: the workbook has to be save before). Just use the formulas as they are shown (don't replace 'filename' with anything else) File path and file name: =CELL("filename",A1) File path only =LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-1) File name only =MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CEL L("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1) The sheet name =RIGHT(CELL("filename",A1),LEN(CELL("filename",A1) )-FIND("]",CELL("file name",A1),1)) -- Regards Frank Kabel Frankfurt, Germany davidoo2005 wrote: How can I obtain the name of a file as a string? For instance, in workbook C:\Documents and Settings\Me\Folder\file1.xls, I would like file1 to be the string. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Are there any NON-Visual Basic solutions for inserting a picture based a derived or called filename? | Excel Worksheet Functions | |||
Cell("filename") doesn't update to new filename when do save as. | Excel Worksheet Functions | |||
substitute the filename in a cell reference with a string in another cell. | Excel Discussion (Misc queries) | |||
Filename in a cell | Excel Worksheet Functions | |||
Inserting Date In Filename Using Macro | Excel Programming |