Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Filename in Excel Cell Address

Is there a way to insert an excel spreadsheet filename into a cell within the
same spreadsheet, like the &[File] command in the Header/Footer screen?
--
Thanks,
RickS
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 72
Default Filename in Excel Cell Address

yes

=CELL("filename")

--


Gary Keramidas
Excel 2003


"RickS" wrote in message
...
Is there a way to insert an excel spreadsheet filename into a cell within
the
same spreadsheet, like the &[File] command in the Header/Footer screen?
--
Thanks,
RickS


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Filename in Excel Cell Address

Hi,

For the Fullname including path

=CELL("filename")

for the file name only

=MID(CELL("filename"),SEARCH("[",CELL("filename"))+1,
SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1)

Note the workbook must be save for this to work
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"RickS" wrote:

Is there a way to insert an excel spreadsheet filename into a cell within the
same spreadsheet, like the &[File] command in the Header/Footer screen?
--
Thanks,
RickS

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Filename in Excel Cell Address

Thanks for your help Mike,

I used the ful path name and it works fine, except it also added the
"Sheet1" at them end, any way not to have that?
--
Thanks,
RickS


"Mike H" wrote:

Hi,

For the Fullname including path

=CELL("filename")

for the file name only

=MID(CELL("filename"),SEARCH("[",CELL("filename"))+1,
SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1)

Note the workbook must be save for this to work
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"RickS" wrote:

Is there a way to insert an excel spreadsheet filename into a cell within the
same spreadsheet, like the &[File] command in the Header/Footer screen?
--
Thanks,
RickS

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Filename in Excel Cell Address

thanks Mike,

I used the full file path approach and it is what I wanted, but it also
placed the "Sheet1" at the end, is there a way to suppress this?
--
Thanks,
RickS


"RickS" wrote:

Is there a way to insert an excel spreadsheet filename into a cell within the
same spreadsheet, like the &[File] command in the Header/Footer screen?
--
Thanks,
RickS



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Filename in Excel Cell Address

thanks Gary,

is there a way to not get the "Sheet1" at the end of the path and filename?
--
Thanks,
RickS


"Gary Keramidas" wrote:

yes

=CELL("filename")

--


Gary Keramidas
Excel 2003


"RickS" wrote in message
...
Is there a way to insert an excel spreadsheet filename into a cell within
the
same spreadsheet, like the &[File] command in the Header/Footer screen?
--
Thanks,
RickS


.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 72
Default Filename in Excel Cell Address


maybe this

=LEFT(CELL("filename"),FIND("[",CELL("filename"),1)-1)
--


Gary Keramidas
Excel 2003


"RickS" wrote in message
...
thanks Gary,

is there a way to not get the "Sheet1" at the end of the path and
filename?
--
Thanks,
RickS


"Gary Keramidas" wrote:

yes

=CELL("filename")

--


Gary Keramidas
Excel 2003


"RickS" wrote in message
...
Is there a way to insert an excel spreadsheet filename into a cell
within
the
same spreadsheet, like the &[File] command in the Header/Footer screen?
--
Thanks,
RickS


.


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Filename in Excel Cell Address

See the info and formula options at Bob Phillips' site.

http://www.xldynamic.com/source/xld.xlFAQ0002.html


Gord Dibben MS Excel MVP

On Tue, 9 Feb 2010 13:25:02 -0800, RickS
wrote:

thanks Mike,

I used the full file path approach and it is what I wanted, but it also
placed the "Sheet1" at the end, is there a way to suppress this?


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
Excel cell address from cell contents TQuestar New Users to Excel 3 January 15th 10 04:03 AM
how to insert the path and filename into cell in excel 2002 fuzzylinux Excel Discussion (Misc queries) 2 June 4th 08 09:24 PM
How do I avoid excel change absolute address to relative address Miguel Excel Discussion (Misc queries) 3 May 10th 07 11:18 PM
Cell("filename") doesn't update to new filename when do save as. Louis Excel Worksheet Functions 2 March 22nd 07 07:27 PM
Excel - print to .pdf using filename reference from cell scooppbear Excel Discussion (Misc queries) 1 May 17th 06 02:36 AM


All times are GMT +1. The time now is 01:29 AM.

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

About Us

"It's about Microsoft Excel"