View Single Post
  #4  
Old June 3rd, 2010, 11:31 PM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default HOW DO I DUPLICATE ONE SHEET MULTIPLE TIMES

Easily done with a macro.

Sub CreateNameSheets()
' by Dave Peterson
' List your 20 names 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 Thu, 3 Jun 2010 14:46:37 -0700, LC wrote:

How do i copy data from one sheet to another, to include the footer and
header.
I created a log for work. I need 20 of them to be able to fit everyones name
on it. I would like to have 20 separate sheets.

Am I able to have 20 sheets in excel?

Thank you.