Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
bobf
 
Posts: n/a
Default putting file name within spreadsheet

Is there any way I can display the name of my Excel
spreadsheet in cell A1 of the spreadsheet?
  #2   Report Post  
RES%nospam
 
Posts: n/a
Default

=CELL("filename",A1)

look in help at =Cell and =Info
for other uses

HTH
RES
  #3   Report Post  
Dave O
 
Posts: n/a
Default

....Type it in?

Yes, but afaik it can only be done with some VBA code.
1. Open the VBA editor
2. Along the left margin choose the VBAProject associated with your
file
3. Right click "This workbook" and select "View Code". A new VBA
editor window opens. Dropdowns along the top should say "This
workbook" and "Open". The structure for a new routine is visible:
"Private Sub Workbook_Open()" and "End Sub".
4. Use this code:
Range("a1").value = activeworkbook.name

Each time you open the file this routine will run. If your workbook
has multiple tabs you'll need to specify which tab to write in: try
this line of code:

Sheets("YourSheetName").select

Final code looks like:
Private Sub Workbook_Open()
Sheets("YourSheetName").Select
Range("a1").Value = ActiveWorkbook.Name
End Sub

  #4   Report Post  
jiwolf
 
Posts: n/a
Default


"bobf" wrote in message
...
Is there any way I can display the name of my Excel
spreadsheet in cell A1 of the spreadsheet?


try: -

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


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
Embedding a file into an Excel spreadsheet? Ranjan Excel Worksheet Functions 0 March 24th 05 11:45 AM
Can I export a .txf file from an Excel spreadsheet for investment. wisbadger Excel Discussion (Misc queries) 1 March 1st 05 08:27 AM
How can you print file properties in an Excel spreadsheet? RSG Excel Discussion (Misc queries) 1 February 21st 05 08:33 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM
I need to download an exel spreadsheet file. (file extension :xls) buckrogers Excel Discussion (Misc queries) 2 December 8th 04 11:08 PM


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