tab name into a cell

andrewhoddie

Board Regular
Joined
Dec 21, 2008
Messages
114
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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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