Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Insert Filepath into Cell

I was wondering if there was a way that I can insert the current filename's filepath into a document? I know how to insert into the header/footer but this is not suitable for what I require.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default Insert Filepath into Cell

Hi Cameron,
see my webpage
http://www.mvps.org/dmcritchie/excel/excel.htm

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Cameron" wrote in message ...
I was wondering if there was a way that I can insert the current filename's filepath into a document? I know how to insert into

the header/footer but this is not suitable for what I require.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Insert Filepath into Cell

Hi
File path and file name:
=CELL("filename",A1)

File path only
=LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-1)

File name only
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CEL
L("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

The sheet name
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1) )-FIND("]",CELL("file
name",A1),1))

--
Regards
Frank Kabel
Frankfurt, Germany


Cameron wrote:
I was wondering if there was a way that I can insert the current
filename's filepath into a document? I know how to insert into the
header/footer but this is not suitable for what I require.


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
Cell value becomes filepath to insert picture,jpg or object Rookie_User Excel Worksheet Functions 0 February 6th 07 04:32 PM
Filepath Marie-Jo Excel Discussion (Misc queries) 3 July 5th 05 07:56 PM
Filepath Marie-Jo Excel Discussion (Misc queries) 2 June 30th 05 11:06 PM
Selecting a filepath based on cell contents ceemo Excel Discussion (Misc queries) 1 June 25th 05 01:40 PM
get filename and filepath Robert Ehrlich Excel Programming 3 December 21st 03 12:23 PM


All times are GMT +1. The time now is 08:33 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"