Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
JKaz
 
Posts: n/a
Default How do I display the file name in the worksheet?

I want to display the file name in a cell in the workshett
  #2   Report Post  
Posted to microsoft.public.excel.misc
SVC
 
Posts: n/a
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
Nick Hodge
 
Posts: n/a
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.misc
JKaz
 
Posts: n/a
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Links picking up values from an older version of linked file Cate Links and Linking in Excel 4 October 20th 05 01:53 PM
How do I display each Excel file I open in the task bar bocjoel Excel Discussion (Misc queries) 3 September 28th 05 08:04 PM
Display Worksheet in Excel File Rowf Excel Discussion (Misc queries) 2 March 30th 05 10:16 PM
how do i create and save a new file or worksheet autmatically ever DAN Excel Discussion (Misc queries) 0 March 30th 05 03:07 PM
Conditional display of a .jpeg file? sbhogle Excel Discussion (Misc queries) 2 November 30th 04 05:57 AM


All times are GMT +1. The time now is 08:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"