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

How can I enter the worksheet name in a cell on the worksheet without haveing
to type it in?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default worksheet name

You can use a formula like the following:

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,32)

Leave the "filename" intact as shown. Do NOT replace it with the
actual filename.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Tucson Guy" <Tucson wrote in
message
...
How can I enter the worksheet name in a cell on the worksheet
without haveing
to type it in?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default worksheet name

Take a look he

http://www.mcgimpsey.com/excel/formu..._function.html



In article ,
"Tucson Guy" <Tucson wrote:

How can I enter the worksheet name in a cell on the worksheet without haveing
to type it in?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default worksheet name

Copy/paste this code to a General Module in your workbook.

Function SheetName(Optional ByVal rng As Range) As String
If rng Is Nothing Then Set rng = Application.Caller
SheetName = rng.Parent.Name
End Function

Sub Test()
ActiveCell.FormulaR1C1 = "=SheetName()"
End Sub

Assign Sub Test() to a button or shortcut key combo.

Gord Dibben Excel MVP


On Wed, 8 Sep 2004 16:03:02 -0700, "Tucson Guy" <Tucson
wrote:

How can I enter the worksheet name in a cell on the worksheet without haveing
to type it in?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default worksheet name

You can write a one-line Visual Basic macro.
I called mine "SheetName".
Try this:
Function SheetName() As String
SheetName = Range("A1").Parent.Name
End Function

-----Original Message-----
How can I enter the worksheet name in a cell on the

worksheet without haveing
to type it in?
.

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
automatically appending newly added data on worksheet to a master list worksheet tabylee via OfficeKB.com Links and Linking in Excel 0 December 17th 09 04:24 PM
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Excel Discussion (Misc queries) 2 August 24th 06 05:26 PM
plot graph from multiple worksheet as embedded chart object on every worksheet jeftiong New Users to Excel 0 August 23rd 06 01:50 PM
Upload multiple text files into 1 excel worksheet + put the filename as the first column in the worksheet Aster Excel Worksheet Functions 3 March 12th 06 09:58 AM
Attaching a JET database to an Excel Worksheet OR storing large binary data in a worksheet Ant Waters Excel Programming 1 September 3rd 03 11:34 AM


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