View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default rename worksheets using existing cell

Hi,

Right click any sheet tab, view code and paste this in and run it

Sub rename()
On Error Resume Next
For x = 1 To Worksheets.Count
shname = Sheets(x).Range("A15")
y = Split(shname, " ")
newname = y(0) & " " & Left(y(1), 1)
Sheets(x).Name = newname
newname = ""
Next
End Sub

Mike

"Jerry" wrote:

I have a spreadsheet with 65 or so worksheets. I need to rename each
worksheet based on info found in cell a15. However cell a15 is last name
first name and I want to pick last name plus the 1st letter of the first
name. Can you assist me? Thanks in advance.