Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Displaying the filename in a cell

Is there any way of displaying the filename of the spreadsheet in a cell
within the workbook?

If not then how simple is it to create a user defined function to do this?

Any help would be much appreciated.

Thanks,

Bhupinder Rayat
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Displaying the filename in a cell

Bhupinder, try this in a cell, workbook has to be saved first

=MID(LEFT(CELL("filename",A1), FIND("]", CELL("filename",A1))-1),FIND("[",
CELL("filename",A1))+1, 255)
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Bhupinder Rayat" wrote in
message ...
Is there any way of displaying the filename of the spreadsheet in a cell
within the workbook?

If not then how simple is it to create a user defined function to do this?

Any help would be much appreciated.

Thanks,

Bhupinder Rayat



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Displaying the filename in a cell

Paul,

That works like a charm!

Can I ask, wat are all the cell refs to A1 for? If I enter any value in cell
A1 it doesn't effect the formula, which is great, but I was just wondering
wat they are for?

Thanks a bunch!

Bhupinder Rayat

"Paul B" wrote:

Bhupinder, try this in a cell, workbook has to be saved first

=MID(LEFT(CELL("filename",A1), FIND("]", CELL("filename",A1))-1),FIND("[",
CELL("filename",A1))+1, 255)
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Bhupinder Rayat" wrote in
message ...
Is there any way of displaying the filename of the spreadsheet in a cell
within the workbook?

If not then how simple is it to create a user defined function to do this?

Any help would be much appreciated.

Thanks,

Bhupinder Rayat




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Displaying the filename in a cell

See my response.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bhupinder Rayat" wrote in
message ...
Paul,

That works like a charm!

Can I ask, wat are all the cell refs to A1 for? If I enter any value in

cell
A1 it doesn't effect the formula, which is great, but I was just wondering
wat they are for?

Thanks a bunch!

Bhupinder Rayat

"Paul B" wrote:

Bhupinder, try this in a cell, workbook has to be saved first

=MID(LEFT(CELL("filename",A1), FIND("]",

CELL("filename",A1))-1),FIND("[",
CELL("filename",A1))+1, 255)
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Bhupinder Rayat" wrote in
message ...
Is there any way of displaying the filename of the spreadsheet in a

cell
within the workbook?

If not then how simple is it to create a user defined function to do

this?

Any help would be much appreciated.

Thanks,

Bhupinder Rayat






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Displaying the filename in a cell

Take a look at

http://www.xldynamic.com/source/xld.xlFAQ0002.html
Excel FAQs - File Path, File and Worksheet Names

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bhupinder Rayat" wrote in
message ...
Is there any way of displaying the filename of the spreadsheet in a cell
within the workbook?

If not then how simple is it to create a user defined function to do this?

Any help would be much appreciated.

Thanks,

Bhupinder Rayat





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("filename") doesn't update to new filename when do save as. Louis Excel Worksheet Functions 2 March 22nd 07 07:27 PM
Filename from a Cell baridude Excel Worksheet Functions 7 August 15th 06 08:23 AM
cell value as a filename dunescratcher Excel Discussion (Misc queries) 4 April 4th 06 12:22 PM
substitute the filename in a cell reference with a string in another cell. flummi Excel Discussion (Misc queries) 11 February 22nd 06 01:14 PM
CELL("FILENAME") JEV Excel Worksheet Functions 4 February 4th 05 10:25 PM


All times are GMT +1. The time now is 06:53 PM.

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"