![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 01:37 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com