Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy adjacent Sheet and name from a list
Code is in sheet "Summary" module. This works fine as far as adding a number of sheet and naming them from the list C9:Cn on sheet named "Summary". There are four names and I get four regular sheets with those names. What I want to do is COPY the sheet next to "Summary" which is named "Main Swb" and name the copies from the list in the "Summary" sheet C9:Cn. Sheet "Main Swb" has some 'bells and whistles' color formatting, a few formulas and some 'merged cells" (big frown here). I need to keep all the goodies intact when copied and renamed. So, I wind up with four copies of "Main Swb" with four different names. I've tried to Set nSht = Sheets("Main Swb").Copy After:=Sheets(Sheets.Count) but it errors out. Thanks, Howard Option Explicit Sub CreateSheets() Dim nSht As Worksheet Dim r As Integer r = 9 Do While Sheets("Summary").Cells(r, 3).Value < "" Set nSht = Sheets.Add 'Names for the new sheet are in C9:Cn of "Summary" nSht.Name = Sheets("Summary").Cells(r, 3).Value r = r + 1 Loop End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
i have a list i need to copy onto another sheet one by one | Excel Discussion (Misc queries) | |||
find IDs in another sheet, copy paste non-adjacent data on orig sh | Excel Programming | |||
Copy Paste from Class Sheet to Filtered List on Combined Sheet | Excel Programming | |||
When data match, copy adjacent value to adjacent column | Excel Worksheet Functions | |||
how to find and copy values on sheet 2, based on a list on sheet 1 | Excel Programming |