View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Gord is offline
external usenet poster
 
Posts: 86
Default Auto worksheet name?

Sub NameWS()
'name sheets with list in B2:B21 on first sheet
On Error Resume Next
For i = 2 To Worksheets.Count
Sheets(i).Name = Sheets(1).Cells(i, 2).Value
Next i
End Sub


Gord Dibben Microsoft Excel MVP

On Sun, 7 Aug 2011 02:20:57 -0700 (PDT), Esradekan
wrote:

On the first sheet (named 'Index') of the workbook in cells B2-B21 I
have a list that changes from year to year. I need to have a
worksheet named from each of the names in the list and need to have
the rest of the worksheets in the book named accordingly. (ie B2 =
Sheet2, B3 = Sheet3 etc etc) Can this be done? and if so, how? Im
using Excel 2010 in a macro enabled book.

Hope someone can help.

TIA

(^-^)<