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 tab names from cell values

Leave your A2 cells alone.

Enter and run this small macro:

Sub tabnames()
For Each w In Worksheets
w.Activate
w.Name = Format(Range("A2").Value, "m-d-yyyy")
Next
End Sub

Each tab will be re-named to the contents of A2, but formatted as a legal
tabname.
--
Gary''s Student


"cursednomore" wrote:

I have 52 worksheets, for each week of the year. In each worksheet, the
beginning date is in A2. I would like to show the beginning date as the tab
name, but I understand that I can't have a "/" in the tab name. Any
suggestions, without physically renaming each sheet?