Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 6
Default Easiest way to expand 1 spreadsheet to a workbook of 12.

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?
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,124
Default Easiest way to expand 1 spreadsheet to a workbook of 12.

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


--
Don Guillett
SalesAid Software

"Shadyhosta" wrote in message
...
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?



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 22,906
Default Easiest way to expand 1 spreadsheet to a workbook of 12.

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

On Wed, 31 Jan 2007 09:40:01 -0800, Shadyhosta
wrote:

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?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CREATE NEW WORKBOOK AND SHEETS BASED ON COLUMN DATA control freak Excel Worksheet Functions 2 July 20th 06 06:00 PM
Protect Workbook vs Worksheet?? Dan B Excel Worksheet Functions 3 November 7th 05 09:02 PM
Auto updating a workbook with data from another workbook Richard Excel Discussion (Misc queries) 0 November 6th 05 03:50 PM
Why would you need more the one spreadsheet for a workbook? Excel Excel Worksheet Functions 5 February 5th 05 12:59 AM
Unprotect Workbook Kent Excel Discussion (Misc queries) 1 February 4th 05 01:07 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"