Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2007

Tip: Looking for answers? Try searching our database.

Easiest way to expand 1 spreadsheet to a workbook of 12.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shadyhosta - 31 Jan 2007 17:40 GMT
If I want to take one master sheet and turn it into 11 more for each month of
the year, what is the easiest way to copy the same sheet for 12 months worth
of Tabs?
Don Guillett - 31 Jan 2007 18:27 GMT
to name the sheets 1,2,3,4,etc
Sub copytemplate()
For i = 1 To 11 'or InputBox("how many")
Sheets("first").Copy after:=Sheets(Worksheets.Count)
activesheet.name="Month " & i
Next i
End Sub

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

> If I want to take one master sheet and turn it into 11 more for each month
> of
> the year, what is the easiest way to copy the same sheet for 12 months
> worth
> of Tabs?
Gord Dibben - 31 Jan 2007 19:28 GMT
Shady

Create a new sheet named List and enter Jauary through December in A1:A12

Change "Template" to "Master" in the code below or temporarily changing your
"Master" sheet to "Template" may be easiest.

Sub CreateNameSheets()
  ' by Dave Peterson
  ' List sheetnames required in col A in a sheet: List
  ' Sub will copy sheets based on the sheet named as: Template
  ' and name the sheets accordingly

   Dim TemplateWks As Worksheet
   Dim ListWks As Worksheet
   Dim ListRng As Range
   Dim myCell As Range

   Set TemplateWks = Worksheets("Template")
   Set ListWks = Worksheets("List")
       With ListWks
       Set ListRng = .Range("a1", .Cells(.Rows.Count, "A").End(xlUp))
   End With

   For Each myCell In ListRng.Cells
       TemplateWks.Copy After:=Worksheets(Worksheets.Count)
       On Error Resume Next
       ActiveSheet.Name = myCell.Value
       If Err.Number <> 0 Then
           MsgBox "Please fix: " & ActiveSheet.Name
           Err.Clear
       End If
       On Error GoTo 0
   Next myCell

End Sub

Gord Dibben  MS Excel MVP

>If I want to take one master sheet and turn it into 11 more for each month of
>the year, what is the easiest way to copy the same sheet for 12 months worth
>of Tabs?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.