Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Thanks for any help.
I would like to get the filename with a worksheet function, is this possible? I tried help "filename" and "file" but nothing of relation. What is a good way to search for these things on the help file? Thanks. |
#2
![]() |
|||
|
|||
![]()
See Debra Dalgleish's site:
http://contextures.com/xlfaqFun.html#SheetName I think I'd search google groups first. Then I'd learn enough to know what to look for in excel's help. Ian Elliott wrote: Thanks for any help. I would like to get the filename with a worksheet function, is this possible? I tried help "filename" and "file" but nothing of relation. What is a good way to search for these things on the help file? Thanks. -- Dave Peterson |
#3
![]() |
|||
|
|||
![]()
Hi
=MID(A1,FIND("[",A1)+1,FIND("]",A1)-FIND("[",A1)-1) The formula may be in any cell. Instead A1 you can refer to any cell - am best you refer to same cell the formula resides in. NB! The workbook MUST be saved - in freschly created unsave workbook it doesn't work! Arvi Laanemets "Ian Elliott" wrote in message ... Thanks for any help. I would like to get the filename with a worksheet function, is this possible? I tried help "filename" and "file" but nothing of relation. What is a good way to search for these things on the help file? Thanks. |
#4
![]() |
|||
|
|||
![]()
Try
=Cell("Filename") I think Arvi meant: =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1) "Ian Elliott" wrote: Thanks for any help. I would like to get the filename with a worksheet function, is this possible? I tried help "filename" and "file" but nothing of relation. What is a good way to search for these things on the help file? Thanks. |
#5
![]() |
|||
|
|||
![]()
Hi
Thanks for correction. I put CELL function into A1 at start, and created an expression to get file name from there - and of course I completly forgot to replace the reference to A1 with formula :-( -- Arvi Laanemets ( My real mail address: arvil<attarkon.ee ) "JMB" wrote in message ... Try =Cell("Filename") I think Arvi meant: =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1) "Ian Elliott" wrote: Thanks for any help. I would like to get the filename with a worksheet function, is this possible? I tried help "filename" and "file" but nothing of relation. What is a good way to search for these things on the help file? Thanks. |
#6
![]() |
|||
|
|||
![]()
I had assumed as much.
"Arvi Laanemets" wrote: Hi Thanks for correction. I put CELL function into A1 at start, and created an expression to get file name from there - and of course I completly forgot to replace the reference to A1 with formula :-( -- Arvi Laanemets ( My real mail address: arvil<attarkon.ee ) "JMB" wrote in message ... Try =Cell("Filename") I think Arvi meant: =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1) "Ian Elliott" wrote: Thanks for any help. I would like to get the filename with a worksheet function, is this possible? I tried help "filename" and "file" but nothing of relation. What is a good way to search for these things on the help file? Thanks. |
#7
![]() |
|||
|
|||
![]()
Ian Elliott wrote...
.... I would like to get the filename with a worksheet function, is this possible? I tried help "filename" and "file" but nothing of relation. What is a good way to search for these things on the help file? First, online help. You could always try looking up the term filename in the help index. Actually, there's no entry for 'filename', but you'd see 'file name' in the 'Or choose keywords' section of the help dialog. The first topic for 'file name' is the CELL worksheet functions (at least in XL10 (XP/2002)). That said, CELL("Filename",A1) only returns the pathname if the file has been saved. If you had other worksheets, you could use some trickery. If you wanted the filename in a cell in worksheet A and you also had a worksheet B, try =MID(CELL("Address",B!$A$1),FIND("[",CELL("Address",B!$A$1))+1, FIND("]",CELL("Address",B!$A$1))-FIND("[",CELL("Address",B!$A$1))-1) This CELL("Address",Range) returns the workbook and worksheet names along with the cell address when Range is in a different worksheet from the cell calling the CELL function in its formula, EVEN IF THE FILE HASN'T BEEN SAVED. So one has to wonder why CELL("Filename",Range) returns "" for unsaved files. |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() This code Code: -------------------- =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1) -------------------- works almost perfect for my needs; however, I need it to drop the extension to where only the name of the name of the file is left. Any thoughts? Thanks! -- Barry Clark ------------------------------------------------------------------------ Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267 View this thread: http://www.excelforum.com/showthread...hreadid=479553 |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND(".",CELL("file
name",A1))-FIND("[",CELL("filename",A1))-1) -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "Barry Clark" wrote in message ... This code Code: -------------------- =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("file name",A1))-FIND("[",CELL("filename",A1))-1) -------------------- works almost perfect for my needs; however, I need it to drop the extension to where only the name of the name of the file is left. Any thoughts? Thanks! -- Barry Clark ------------------------------------------------------------------------ Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267 View this thread: http://www.excelforum.com/showthread...hreadid=479553 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Comparing a list to a Calendar worksheet. | Excel Worksheet Functions | |||
changing font style in a complex worksheet function | Excel Worksheet Functions | |||
How do I use the TABLE worksheet function? | Excel Worksheet Functions | |||
Automatically up date time in a cell | Excel Discussion (Misc queries) | |||
The Help on the Excel Edate worksheet function contains an error:. | Excel Worksheet Functions |