Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Excel filename into cell

Hi,

Is it possible to get the filename of an excel-file into cel A1?

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Excel filename into cell


With a formula for a Saved file, there are various ways
such as:

=MID(LEFT(CELL("filename", A1), FIND("]", CELL("filename",
A1))-1),FIND("[", CELL("filename",A1))+1, 255)

above as one line

Or with vba,

Sub test2()

Range("A1").Value = ActiveWorkbook.Name
End Sub

Regards,
Sandy

-----Original Message-----
Hi,

Is it possible to get the filename of an excel-file into

cel A1?

Thanks


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Excel filename into cell

Hi
Use (just insert the formulas as-is. Note: the workbook
has to be saved before)
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)
+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL
("filename",A1),1)-1)

-----Original Message-----
Hi,

Is it possible to get the filename of an excel-file into

cel A1?

Thanks


.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Excel filename into cell

Thanks for the reply...
Tried to enter it in cell A1 but got an error ....
JP
"Frank Kabel" schreef in bericht
...
Hi
Use (just insert the formulas as-is. Note: the workbook
has to be saved before)
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)
+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL
("filename",A1),1)-1)

-----Original Message-----
Hi,

Is it possible to get the filename of an excel-file into

cel A1?

Thanks


.



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
Filename in Excel Cell Address RickS Excel Discussion (Misc queries) 7 February 9th 10 11:58 PM
how to insert the path and filename into cell in excel 2002 fuzzylinux Excel Discussion (Misc queries) 2 June 4th 08 09:24 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
Save excel file with filename = cell text TroyB[_2_] Excel Programming 1 November 26th 03 01:00 AM


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