Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Does anyone know how to name a worksheet based on a row in a specific
worksheet. I have a listing of about 300 items and I need to create a worksheet for each of these items. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H1" '<== change to suit On Error GoTo ws_exit Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target Me.Name = .Value End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) wrote in message ups.com... Does anyone know how to name a worksheet based on a row in a specific worksheet. I have a listing of about 300 items and I need to create a worksheet for each of these items. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You don't have the sheets created yet and you want to create a new sheet for
each name in a range? You say your "row" has about 300 items. Are you using Excel 2007? If not, the maximum items in a row can be 256. This macro will create a new sheet for each name in row 1 from A1:IV1 in Sheet1 If using 2007, expand the range to suit. Sub Add_Sheets22() Dim rCell As Range For Each rCell In Sheets("Sheet1").Range("A1:IV1") With Worksheets.Add(After:=Worksheets(Worksheets.Count) ) .Name = rCell.Value End With Next rCell End Sub Gord Dibben MS Excel MVP On 19 Apr 2007 06:49:45 -0700, wrote: Does anyone know how to name a worksheet based on a row in a specific worksheet. I have a listing of about 300 items and I need to create a worksheet for each of these items. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I create a list (Word) of the names on Excel worksheet tabs | Excel Worksheet Functions | |||
extracting names, shifts dept from excel worksheet | Excel Worksheet Functions | |||
In Excel, how do I change worksheet headers (A,B) to names (Box)? | New Users to Excel | |||
How to find hidden names on an Excel worksheet ? | Excel Worksheet Functions | |||
How to link Excel worksheet tab names to dates in each worksheet? | Excel Worksheet Functions |