I want to display the file name in a cell in the workshett
To get the full file name including file path, type =cell(quot;filenamequot;)
quot;JKazquot; wrote:
gt; I want to display the file name in a cell in the workshett
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(quot;Filenamequot;)
This give you just the filename
=MID(CELL(quot;Filenamequot;),FIND(quot;[quot;,CELL(quot;Filenamequot;),1) 1,(FIND(quot;.quot;,CELL(quot;Filenamequot;) ,1) 4)-(FIND(quot;[quot;,CELL(quot;Filenamequot;),1) 1))
(Beware the wrap above)
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HISquot;JKazquot; gt; wrote in message
...
gt;I want to display the file name in a cell in the workshett
No matter which of the suggested formulas you use, you'll be better off to
include a cell reference in those formulas:
=cell(quot;filenamequot;,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(quot;filenamequot;)
in each window.
Then look at the opposite window.
JKaz wrote:
gt;
gt; I want to display the file name in a cell in the workshett
--
Dave Peterson
Thanks! It Works! JKaz
quot;SVCquot; wrote:
gt; To get the full file name including file path, type =cell(quot;filenamequot;)
gt;
gt; quot;JKazquot; wrote:
gt;
gt; gt; I want to display the file name in a cell in the workshett
- Mar 09 Fri 2007 20:36
How do I display the file name in the worksheet?
close
全站熱搜
留言列表
發表留言