A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Creating Sheet Tabs from a list



 
 
Thread Tools Display Modes
  #1  
Old May 11th, 2007, 05:33 PM posted to microsoft.public.excel.misc
PFLY
external usenet poster
 
Posts: 18
Default 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  
Old May 11th, 2007, 06:03 PM posted to microsoft.public.excel.misc
JE McGimpsey
external usenet poster
 
Posts: 2,468
Default 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  
Old May 11th, 2007, 06:06 PM posted to microsoft.public.excel.misc
Bernard Liengme
external usenet poster
 
Posts: 4,085
Default 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  
Old May 11th, 2007, 06:10 PM posted to microsoft.public.excel.misc
Bernard Liengme
external usenet poster
 
Posts: 4,085
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.