ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   CREATE MULTIPLE WORK SHEETS IN A WORKBOOK (https://www.excelbanter.com/excel-worksheet-functions/124229-create-multiple-work-sheets-workbook.html)

excel multiple worksheets

CREATE MULTIPLE WORK SHEETS IN A WORKBOOK
 
How to easily create multiple worksheets from a template instead of one at
once.

Gord Dibben

CREATE MULTIPLE WORK SHEETS IN A WORKBOOK
 
Copy 1 then copy 2 then copy 4 then copy 8..............

You would have to manually rename them of course to make any sense.

Alternative is a macro........

Make sure the Template sheet is the activesheet before running.

Sub SheetCopy()
Dim i As Long
On Error GoTo endit
Application.ScreenUpdating = False
shts = InputBox("How many copies?")
For i = 1 To shts
ActiveSheet.Copy After:=ActiveSheet
With ActiveSheet
.Name = "NewSheet" & i 'or January & i or similar
End With
Next i
Application.ScreenUpdating = True
endit:
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP


On Sun, 31 Dec 2006 13:44:00 -0800, excel multiple worksheets <excel multiple
wrote:

How to easily create multiple worksheets from a template instead of one at
once.




All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com