#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default Workbook name

Is there a way to copy the Workbook Name into a worksheet?

Say I had a workbook called Test Me.xls, when it is opened it will put "Test
(dont meed the "me") into cell A1?

Thank you in advance!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default Workbook name

BEAUTIMOUS!

Thank you for the help works great!

Maybe help with my next quesition about formatting? How can I format the
target cell to ignore the first X amount of charaters and the ignore the
".xls" at the end?

Thank you once again!

"Chip Pearson" wrote:

Try

Private Sub Workbook_Open()
Me.Worksheets("Sheet1").Range("A1").Value = Me.Name
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"Steve" wrote in message
...
Thank you, that does work.

How can I make this happen with a Workbook_Open() event? (I am sick of
messing with it)

Thank you once again!

"daddylonglegs" wrote:

This formula will give you the "Test Me"

=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND(".xls",CELL("filenam e",A1))-FIND("[",CELL("filename",A1))-1)

If you just want the first word in the filename try

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



"Steve" wrote:

Is there a way to copy the Workbook Name into a worksheet?

Say I had a workbook called Test Me.xls, when it is opened it will put
"Test
(dont meed the "me") into cell A1?

Thank you in advance!




  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 620
Default Workbook name

Look at the MID() function.
Try =MID(A1,X+1,LEN(A1)-X-4)
--
David Biddulph

"Steve" wrote in message
...
....
Maybe help with my next quesition about formatting? How can I format the
target cell to ignore the first X amount of charaters and the ignore the
".xls" at the end?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default Workbook name

Thank you David and Chip, after some experimenting I did get it to work
properly.

Keep up the great work, you make it much easier for lackies like myself!

Steve

"David Biddulph" wrote:

Look at the MID() function.
Try =MID(A1,X+1,LEN(A1)-X-4)
--
David Biddulph

"Steve" wrote in message
...
....
Maybe help with my next quesition about formatting? How can I format the
target cell to ignore the first X amount of charaters and the ignore the
".xls" at the end?




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
How to merge monthly workbooks into a quarterly workbook?? erinattbt123 Excel Worksheet Functions 6 September 19th 06 10:56 PM
excel exits unexpectedly or hangs the second time I open workbook r_m_i Excel Discussion (Misc queries) 0 February 9th 06 10:14 PM
Repost:Automatically inserting a row in external workbook 50pingviner Excel Discussion (Misc queries) 3 December 28th 05 07:38 PM
keeping a toolbar attached to a workbook Paul Ponzelli Excel Discussion (Misc queries) 0 August 12th 05 11:39 PM
How to hyperlink from a workbook to sheets in another workbook? MJOHNSON Excel Worksheet Functions 0 February 17th 05 08:31 PM


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