Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rename every worksheet in a workbook after a cell reference

Status
Not open for further replies.

Briscoe

Technical User
Feb 10, 2003
29
US
I am needing to have every sheet in my workbook named after a specific cell reference. For instance, I want every sheet in the workbook to be named after the text that is in cell A5 on that worksheet. I need it to go through all of the worksheets in the workbook and perform the same task.

Can anyone help?
 
Hi,

Code:
for each ws in worksheets
  with ws
    .name = .[A5].value
  end with
next


Skip,
[sub]
[glasses] [red]Be advised:[/red] When you ignite a firecracker in a bowl of vanilla, chocolate & strawberry ice cream, you get...
Neopolitan Blownapart! [tongue][/sub]

 
For Each sh In ActiveWorkbook.Worksheets
sh.Name = sh.Range("A5")
Next

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top