tab name into a cell

andrewhoddie

Board Regular
Joined
Dec 21, 2008
Messages
118
Hello

Is there a way of using the tab name to automatically enter that name into a cell e.g. tab name is 11mar11 and this would be automatically input in to cell A1,

This could work the other way round if that is easier so cell A1 would name the worksheet tab.

thanks
Andrew
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi. The file must be saved first for this to work

<code>=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1)))</code>
 
Upvote 0
Try this code it will go through each sheet and place the sheet name in cell A1 on each sheet

Sub checkSheet()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Range("a1") = ws.Name

Next ws
End Sub

you could change part of the code if you want the sheet name to be the same as A1.;)
 
Upvote 0

Forum statistics

Threads
1,224,570
Messages
6,179,610
Members
452,931
Latest member
The Monk

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