ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Creating Sheet Tabs from a list (https://www.excelbanter.com/excel-discussion-misc-queries/142436-creating-sheet-tabs-list.html)

PFLY

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?

JE McGimpsey

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?


Bernard Liengme

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?




Bernard Liengme

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?





All times are GMT +1. The time now is 07:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com