Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Duplicate sheets by data count
I have one sheet named "contacts" that lists approx 100 people in
"column A". I have another sheet that is used as a template, which I need to duplicate by the number of people in the contacts column. The sheets need to be number 2 - 100 and the name of each contact is to be placed in their corresponding sheet at A1. As well as placing the contact name in the sheet, this name should be hyper linked back to the contacts sheet. I started trying to merge these two Subs to achieve this but I think I am missing something. Sub Duplicate_Sheet() Dim i As Integer Application.ScreenUpdating = False For i = 1 To 100 Sheets("template").Copy after:=Sheets(Sheets.Count) Sheets("template (2)").Name = i Next Application.ScreenUpdating = True End Sub Sub Addsheets() Dim rng as Range Cell as Range with worksheets("contacts") set rng = .Range("A2",.Range("A2").End(xldown)) End with for each cell in rng worksheets.Add After:=Worksheets(worksheets.count) activesheet.name = Cell.value Next end sub Many Thanks in Advance gh0st |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Count but ignore duplicate data | Excel Discussion (Misc queries) | |||
Excel 2003: Duplicate dashboard and data sheets | Excel Discussion (Misc queries) | |||
multiple criteria count formula with duplicate data | Excel Worksheet Functions | |||
formulae to look at 52 sheets &count if 2 cells have data entered | Excel Discussion (Misc queries) | |||
formulae to look at 52 sheets &count if 2 cells have data entered | Excel Discussion (Misc queries) |