Multiple Worksheet Cell Rename

hyewiz

Board Regular
Joined
Nov 29, 2008
Messages
91
What I need is in a workbook with 135 worksheets each has custom name, I want to enter same worksheet name in cell C1,

for example "C1 of worksheet Alex to have Alex typed" is there a way in VBA to do at once.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Give this a try:

Code:
Sub SheetNames()
    Dim ws As Worksheet
    
    For Each ws In ActiveWorkbook.Worksheets
        ws.Name = ws.Range("C1").Value
    Next ws
End Sub
 
Upvote 0
I want to enter same worksheet name in cell C1

hyewiz,

If I understand you correctly, then, here is a macro solution for you to consider.

Code:
Sub SheetNameIntoCell_C1()
' hiker95, 11/16/2017, ME1031835
Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
  ws.Range("C1").Value = ws.Name
Next ws
Application.ScreenUpdating = True
End Sub
 
Last edited:
Upvote 0
Hi hyewiz,
There is another way to do this without VBA to insert the name of your sheets.
1. Right click the tab and Select all sheets.
2. Insert the below formula into C1
Code:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)

All your sheets will have their independent sheet names.
 
Upvote 0
hyewiz,

Thanks for the feedback.

You are very welcome. Glad we could help.

And, come back anytime.
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,520
Members
449,088
Latest member
RandomExceller01

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