Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tetsuya Oguma
 
Posts: n/a
Default Get a Worksheet name through a function

Hi all,

Is there any way to get the name of a worksheet by CodeName or any parameter?

So, something like "=GetWorksheetName("Sheet1")" gives me "My Sheet".

Thank you.
---
Tetsuya Oguma, Singpaore
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Get a Worksheet name through a function

Answering your subject line more than the body

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

will return the sheet name of the sheet that holds the formula as long as
the workbook is saved first

--

Regards,

Peo Sjoblom

Northwest Excel Solutions

www.nwexcelsolutions.com

(remove ^^ from email address)

Portland, Oregon




"Tetsuya Oguma" wrote in message
...
Hi all,

Is there any way to get the name of a worksheet by CodeName or any
parameter?

So, something like "=GetWorksheetName("Sheet1")" gives me "My Sheet".

Thank you.
---
Tetsuya Oguma, Singpaore


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
davesexcel
 
Posts: n/a
Default Get a Worksheet name through a function


http://support.microsoft.com/?kbid=213475

here's the microsoft.com for UDF to put sheet name in a cell;
as well as some other codes that have been in the forum





list sheet macro
here is a great code from two greats!
insert this code in a module and assign a button to it, even create a
button in the toolbars.
When you click on the button a list of your sheets will pop up, you can
even click on one of the sheets in the list and you will go there.


Sub SheetList_CP()
'Chip Pearson, 2002-10-29, misc., %23ByZYZ3fCHA.1308%40tkmsftngp11
'Dave Peterson, same date/thread, 3DBF0BA8.4DAE9DA0%40msn.com
On Error Resume Next
Application.CommandBars("Workbook Tabs").Controls("More
Sheets...").Execute
If Err.Number 0 Then
Err.Clear
Application.CommandBars("Workbook Tabs").ShowPopup
End If
On Error GoTo 0
End Sub



for more on sheets check out this site
http://www.mvps.org/dmcritchie/excel/sheets.htm






Here's another code you might like, insert it in your worksheet module
Whatever the value you have in Cell A1, will be your sheet name, just
interesting!


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target.Address = "$A$1" Then
If Target.Value < "" Then
Me.Name = Target.Value
End If
End If
End Sub
Edit/Delete Message


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=520904

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
Is there a function to copy an entire worksheet? nickclingan Excel Worksheet Functions 3 December 23rd 05 03:23 PM
Setting Cell Number Format With A Worksheet Function [email protected] Excel Worksheet Functions 1 December 16th 05 07:37 PM
Paste function is greyed out in the toolbar and I can't use ctl V - worksheet won't allow pasting Bob Reynolds Excel Discussion (Misc queries) 3 December 15th 05 03:24 PM
Is there a worksheet function that will... Adam Kroger Excel Worksheet Functions 1 November 20th 05 07:41 PM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM


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