View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Automatic worksheet name from cell on that worksheet (A2)

After verifying that the names in A2 are valid worksheet names, run:

Sub wwwwwnameit()
Dim w As Worksheet
For Each w In Worksheets
w.Activate
w.Name = Range("A2").Value
Next
End Sub
--
Gary''s Student


"Rob" wrote:

I have a workbook with 20+ worksheets and want each tab to reflect what is in
A2 of the respective worksheet.