Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
cyndi
 
Posts: n/a
Default make a cell equal a worksheet name

Hi, Lets say I have a worksheet named budget, and I want the name of that
worksheet to appear in a cell, is there a formula that can do that, for
example =budget!, that doesnt seem to work for me, Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
Kevin B
 
Posts: n/a
Default make a cell equal a worksheet name

The following custom function will do it for you.

Function WhoAmI() As String

Dim wb As Workbook
Dim ws As Worksheet

Set wb = ActiveWorkbook
Set ws = wb.ActiveSheet

Application.Volatile
WhoAmI = ws.Name

Set wb = Nothing
Set ws = Nothing

End Function

In Excel, press Alt + F11 to open the VBE. On the VBE menu, click INSERT
and select MODULE. Copy or type the formula above from the line Function
WhoAmI() through End Function inclusive and paste it in the module.

You can then use the function by type =WhoAmI() in the cell of your choice.
--
Kevin Backmann


"cyndi" wrote:

Hi, Lets say I have a worksheet named budget, and I want the name of that
worksheet to appear in a cell, is there a formula that can do that, for
example =budget!, that doesnt seem to work for me, Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
Elkar
 
Posts: n/a
Default make a cell equal a worksheet name

See if this works for you:

=MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1),1)+1,1024)

HTH,
Elkar


"cyndi" wrote:

Hi, Lets say I have a worksheet named budget, and I want the name of that
worksheet to appear in a cell, is there a formula that can do that, for
example =budget!, that doesnt seem to work for me, Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
cyndi
 
Posts: n/a
Default make a cell equal a worksheet name

your the best, that formula so worked, so did the macro, but I really was
looking for a formula, thanks so much

"Elkar" wrote:

See if this works for you:

=MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1),1)+1,1024)

HTH,
Elkar


"cyndi" wrote:

Hi, Lets say I have a worksheet named budget, and I want the name of that
worksheet to appear in a cell, is there a formula that can do that, for
example =budget!, that doesnt seem to work for me, Thanks

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
can I make cell "yes" equal 1, "no" equal 0 can I make cell yes equal 1, no equa Excel Discussion (Misc queries) 4 April 22nd 23 06:09 AM
Conversion of Cell Contents into a Functional Worksheet name ? GMJT Excel Worksheet Functions 1 August 21st 05 04:59 PM
make a letter in a cell automatically equal a dollar amount kimzim Excel Discussion (Misc queries) 1 August 17th 05 08:26 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
Can solver be used to make a cell equal to another cell BF Excel Worksheet Functions 2 May 27th 05 12:44 AM


All times are GMT +1. The time now is 02:38 AM.

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"