sheet labels

jstritch

New Member
Joined
Mar 19, 2002
Messages
3
Is there a way to put a formula in a sheet tab? I want to label a sheet with the data in a specific cell.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
On 2002-03-20 11:27, jstritch wrote:
Is there a way to put a formula in a sheet tab?

sadley i do not think so .

Fis i use row 1 as dumping ground fpr such detail so never delete row 1 (Chris D)
 
Upvote 0
Of course there is a way :)

Open the code designer and double click on the sheet object which you want to try naming then paste this code.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error Resume Next
If Target.Address = "$A$1" Then Sheet1.Name = Target
If Err Then Target = ActiveSheet.Name
End Sub

A worksheet's Name property means Label on Worksheets Tab.

Error handling stands for avoid names.

A1 cell used as the label source.

This code will be executed everytime cell A1 changed then if the text value in A1 is allowed to use as the sheet name then sheet name on the tab would be changed.

Regards
 
Upvote 0

Forum statistics

Threads
1,213,506
Messages
6,114,024
Members
448,543
Latest member
MartinLarkin

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