Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Adding copies of a master

Within a workbook, is it possible to insert multiple copies of worksheets at
one time? I have a master and need to insert 20 copies within the workbook
to enter employee data.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Adding copies of a master

How would you like to name those copied sheets?

You could put a list of names in a sheet called "List"

Say newsheet1, newsheet2, newsheet3 down to A20 then run this macro from Dave
Peterson.

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: Master
' and name the sheets accordingly

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

Set TemplateWks = Worksheets("Master")
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 Thu, 5 Jul 2007 16:50:00 -0700, kmaki
wrote:

Within a workbook, is it possible to insert multiple copies of worksheets at
one time? I have a master and need to insert 20 copies within the workbook
to enter employee data.

Thanks.


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
ask for one print and it gives 6 copies raybag Excel Discussion (Misc queries) 0 October 17th 06 03:03 AM
2 copies open James M Excel Discussion (Misc queries) 2 May 4th 06 07:35 PM
Print number of copies Tarique Excel Discussion (Misc queries) 2 April 24th 06 07:45 PM
Carbon Copies Jaycrutch Excel Discussion (Misc queries) 1 April 18th 06 04:50 PM
Adding Rows to Master Sheet Excel Newbie New Users to Excel 1 December 23rd 04 10:56 PM


All times are GMT +1. The time now is 05:44 PM.

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

About Us

"It's about Microsoft Excel"