Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
netorius77
 
Posts: n/a
Default Inserting the file path in a cell

I am using Excel 2003. I know how to insert the full path and file name in a
footer, however, is there any way (possibly a function) to display the full
path and file name in a cell?
  #2   Report Post  
Gary''s Student
 
Posts: n/a
Default

Yes.

Use the =CELL("filename") function

Have a good day
--
Gary''s Student


"netorius77" wrote:

I am using Excel 2003. I know how to insert the full path and file name in a
footer, however, is there any way (possibly a function) to display the full
path and file name in a cell?

  #3   Report Post  
netorius77
 
Posts: n/a
Default

Too smart by far - thanks exactly what I wanted.

"Gary''s Student" wrote:

Yes.

Use the =CELL("filename") function

Have a good day
--
Gary''s Student


"netorius77" wrote:

I am using Excel 2003. I know how to insert the full path and file name in a
footer, however, is there any way (possibly a function) to display the full
path and file name in a cell?

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

You may want to use:

=cell("filename",a1)

If you have multiple workbooks open, then this formula will evaluate to the
activeworkbook.

If you try it with two workbooks open (and windows arranged nicely), you'll see
the problem.

netorius77 wrote:

Too smart by far - thanks exactly what I wanted.

"Gary''s Student" wrote:

Yes.

Use the =CELL("filename") function

Have a good day
--
Gary''s Student


"netorius77" wrote:

I am using Excel 2003. I know how to insert the full path and file name in a
footer, however, is there any way (possibly a function) to display the full
path and file name in a cell?


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Inserting the file path in a cell

So what would be the formula if you want JUST the file name, and not the
whole path???

"Dave Peterson" wrote:

You may want to use:

=cell("filename",a1)

If you have multiple workbooks open, then this formula will evaluate to the
activeworkbook.

If you try it with two workbooks open (and windows arranged nicely), you'll see
the problem.

netorius77 wrote:

Too smart by far - thanks exactly what I wanted.

"Gary''s Student" wrote:

Yes.

Use the =CELL("filename") function

Have a good day
--
Gary''s Student


"netorius77" wrote:

I am using Excel 2003. I know how to insert the full path and file name in a
footer, however, is there any way (possibly a function) to display the full
path and file name in a cell?


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Inserting the file path in a cell

And by filename, you been something like: Book 2.xls
not c:\my documents\excel\book 2.xls
right???

If yes:

=CELL("Filename",A1)
will give you something like:
C:\My Documents\Excel\[book 2.xls]My Sheet Name

So you can use:
=FIND("[",CELL("Filename",A1))
to find the position of the [ character

And
=FIND("]",CELL("Filename",A1))
to find the position of the ] character

And we want the mid portion of that long string starting one character to the
right of [ character for a length of whatever's between the []'s (subtract the
position of the ] from the position of the [ and subtract 1.

Putting it all together in a giant formula:

=MID(CELL("Filename",A1),FIND("[",CELL("Filename",A1))+1,
FIND("]",CELL("Filename")) - FIND("[",CELL("Filename",A1)) - 1)

Remember that the file still needs to be saved at least once for this to work.



balterson wrote:

So what would be the formula if you want JUST the file name, and not the
whole path???

"Dave Peterson" wrote:

You may want to use:

=cell("filename",a1)

If you have multiple workbooks open, then this formula will evaluate to the
activeworkbook.

If you try it with two workbooks open (and windows arranged nicely), you'll see
the problem.

netorius77 wrote:

Too smart by far - thanks exactly what I wanted.

"Gary''s Student" wrote:

Yes.

Use the =CELL("filename") function

Have a good day
--
Gary''s Student


"netorius77" wrote:

I am using Excel 2003. I know how to insert the full path and file name in a
footer, however, is there any way (possibly a function) to display the full
path and file name in a cell?


--

Dave Peterson


--

Dave Peterson
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
Defining a Cell for Save as file name psasales Excel Discussion (Misc queries) 0 September 21st 05 06:51 PM
copying cell names Al Excel Discussion (Misc queries) 12 August 11th 05 03:01 PM
Inserting time in cell to the right mrICYFIRE Excel Worksheet Functions 1 August 4th 05 07:19 AM
Help inserting a Cell Value in a Text Cell Dave Excel Worksheet Functions 5 March 5th 05 09:06 PM
How do I use a cell as a referance to a file in a lookup statemen. SarahP Excel Worksheet Functions 1 January 27th 05 11:09 PM


All times are GMT +1. The time now is 10:56 PM.

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"