Worksheet Tab Name As a Cell Value

brucer7

New Member
Joined
Apr 20, 2002
Messages
3
Is there a formula for getting the worksheet tab name as a cell value ??? Or would a macro be the only way ???

Thanks for the help !!!

Alleleuia,
Bruce Radic
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Best I can come up with here is to type in something like

Range("A1") = activesheet.name

in the immediate window.

Hope this helps

RET79
 
Upvote 0
or
Sub cellval()
Range("a1").Value = ActiveSheet.Name
End Sub
will do it
I couldn't get the first example above to work?
This message was edited by brettvba on 2002-04-21 17:35
 
Upvote 0
Hi,

Standard way using a cell formula
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1),1))

The workbook must have been saved for this approach to work.

Alternatively, you can write simple UDF:
-----------------------
Function NameSheet()
NameSheet = Application.Caller.Parent.Name
End Function
------------------------

Called as =NameSheet()

Bye,
Jay
This message was edited by Jay Petrulis on 2002-04-21 18:27
 
Upvote 0

Forum statistics

Threads
1,214,566
Messages
6,120,257
Members
448,952
Latest member
kjurney

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top