View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
shapiro shapiro is offline
external usenet poster
 
Posts: 34
Default Automatically name worksheets

Thanks Max.. the tip realy worked!

"Max" wrote:

Just to add that I've also diligently ensured the following rules for
sheetnames before running the sub ..

1. Name in B2 does not exceed 31 characters
2. Name in B2 does not contain any of the following characters:
: \ / ? * [ or ]
3. that there's a name in B2 (ie B2 is not blank)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Max" wrote:
"shapiro" wrote:
I have over ?? worksheets that I would like to name by referencing to a cell. I
have seen some postings here which suggests a macro formula but I keep
getting error. Does anyone have any suggestions?


I've used this sub kindly given by Neil for years without problem <g:

Sub RenameWS()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
ws.Name = Range("B2").Value
Next
End Sub

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---