Written by Allen Wyatt (last updated September 23, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021
Jennifer frequently has to create copies of worksheets once she has the first worksheet of a workbook set up, and it's usually a good number of copies. For instance, it is not unusual for her to need to create 20 copies of a particular worksheet. She wonders if there is a way to easily make multiple copies. Right-clicking and using the move/copy feature gets rather tiresome after a while.
There is a way to use the move/copy option a bit more efficiently. Let's say, for instance, that you want to create 20 worksheets from your original one. You could follow these steps:
That may seem like a lot of steps, but it isn't really—all you've done is to use the move/copy feature five times instead of 20 times to get to the desired number of worksheets. There is one caveat to this approach, though—if the worksheet you are copying has any defined tables in it, then you won't be able to get past step 8. When you try step 9, you'll get a message saying that you cannot copy or move a group of worksheets when any of them contain tables. (You can copy or move a single worksheet containing a table, just not a group of them.)
There is another shortcut you can use, and it doesn't involve using the Move or Copy dialog box. All you need to do is to select the worksheet you want to copy and drag the worksheet name (on the worksheet tab) to the right. You'll see a small "document" icon appear next to the mouse pointer. Press the Ctrl key at this point, and a plus sign appears inside the icon. When you release the mouse button, then the worksheet is copied. You can also copy groups of worksheets in this manner unless, again, there are any defined tables in the worksheets in the group.
Another option to copying your worksheet is to do the following:
This copies everything from the master worksheet, but it doesn't copy some things like column widths, row heights, or print layout settings. You can perform some additional steps to copy some of these, but it is difficult to copy them all.
For sheer speed and convenience, though, using a macro to create the copies is (in my view) the easiest. Here's a very simple macro that will make copies of the selected worksheet until such point as there are a total of 20 worksheets in the workbook:
Sub SimpleCopy1() Do While Sheets.Count < 20 ActiveSheet.Copy After:=Sheets(Sheets.Count) Loop End Sub
If your workbook has additional worksheets in it already (besides the one you want to copy), then you would benefit by using this version:
Sub SimpleCopy2() Dim J As Integer For J = 1 To 20 ActiveSheet.Copy After:=Sheets(Sheets.Count) Next J End Sub
You can make your macro a bit more general purpose by having it ask the user how many copies should be made:
Sub SimpleCopy2() Dim J As Integer Dim iWanted As Integer On Error GoTo Done iWanted = Cint(InputBox("Number of copies?")) If iWanted >0 And iWanted < 201 Then For J = 1 To iWanted ActiveSheet.Copy After:=Sheets(Sheets.Count) Next J End If Done: On Error GoTo 0 End Sub
This macro also limits the number of worksheet copies made to between 1 and 200. (Outside of that range, it will do nothing.) The error handling is added in case your workbook already has a large number of worksheets and adding additional ones exceeds the number of worksheets it is permissible to have in a workbook.
Regardless of which macro approach you choose, it is a good idea to add it to your Quick Access Toolbar or assign a shortcut key to it. That way you can copy your worksheets very quickly.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (1600) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
Microsoft added a new feature to Excel that causes a "lock icon" to appear at the left of a worksheet tab if the ...
Discover MoreTrying to track down a single worksheet among many hidden worksheets can be a challenge. This tip examines a few ...
Discover MoreSorting worksheet tabs can be done by using a macro. This tip provides a macro that accomplishes this task, but it also ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2023-10-08 02:09:34
Tomek
I think the following approach may be more efficient than the 30-step procedure from this tip:
Once you have your worksheet designed, you can save it to your startup location as Sheet.xltm. But before you do that, you should rename or create a copy of any existing file with this name, so that you can restore it later.
You can find your startup location by typing the following into the address box:
%appdata%\Microsoft\Excel\XLSTART.
Once you have your file there, when you add a new sheet to an open workbook (click on the plus button to the right of existing sheet tabs), it will add your designed sheet, as it will be based on the Sheet.xltm from your startup location. Click on New Sheet button as many time as you need copies of that sheet.
Once done, restore your original Sheet.xltm file in the startup location, or if there was none, just delete or rename your designer file.
BTW, if Sheet.xltm in XLSTART has more than one sheet, all of them will be added, not just one.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments