If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Creating Sheet Tabs from a list
How do I take a list from a sheet tab (say 100 items in Column A of the tab)
and make a sheet tab for every item in the list? |
#2
|
|||
|
|||
Creating Sheet Tabs from a list
One way:
Public Sub MakeTabsFromList() Dim i As Long Dim nCount As Long nCount = Worksheets.Count With ActiveSheet With .Range(.Cells(1, 1), .Cells(.Rows.Count, 1).End(xlUp)) Worksheets.Add _ After:=Worksheets(nCount), _ Count:=.Rows.Count On Error Resume Next For i = 1 To .Rows.Count Worksheets(i + nCount).Name = .Cells(i).Text Next i On Error GoTo 0 End With End With End Sub In article , PFLY wrote: How do I take a list from a sheet tab (say 100 items in Column A of the tab) and make a sheet tab for every item in the list? |
#3
|
|||
|
|||
Creating Sheet Tabs from a list
This worked for me - change A1:A4 to whatever suits your need
Sub makebook() myrange = Range("A1:A4") For Each mycell In myrange Worksheets.Add After:=Sheets(Sheets.Count) myname = Format(mycell, "xxxxxxxxxx") ' if the entries are numbers use: myname = Format(mycell, "0000") Worksheets(Sheets.Count).Name = myname Next End Sub best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "PFLY" wrote in message ... How do I take a list from a sheet tab (say 100 items in Column A of the tab) and make a sheet tab for every item in the list? |
#4
|
|||
|
|||
Creating Sheet Tabs from a list
By the way: you are inserting WORKSHEETS. "Tabs" are just the do-hickie
things (that's a technical term gr) that you click to open a sheet (worksheet or chartsheet) best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "PFLY" wrote in message ... How do I take a list from a sheet tab (say 100 items in Column A of the tab) and make a sheet tab for every item in the list? |
Thread Tools | |
Display Modes | |
|
|