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, and Excel in Office 365.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
If you have multiple worksheets that each provide different ways to arrive at the same results, you may be wondering how ...
Discover MoreWant to grab the names of all the worksheets in a workbook? Here's how you can stuff all those names into the cells of a ...
Discover MoreNeed to create a large number of worksheets using specific names? If so, you'll love the ideas presented in this tip.
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2018-09-10 09:55:42
David R
The CTRL and drag method is my timesaving tip of the day, nice one!
2018-09-09 23:10:14
Alex B
Using the copy method, as long as you use Ctrl+A or click in the top left box to select the entire spreadsheet, the column widths & row heights seem to copy across fine.
Macro option - If you are doing a lot of this hopefully there is commonality in the process so that you can tailor your copy macro to add an appropriate sheet name and heading to each of the copied sheet.
2018-09-09 14:52:01
Dave K
If you save the macro to the PERSONAL.XLSB workbook, you will be able to run it against any open workbook. Otherwise you will be restricted to one in which it was saved.
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 © 2021 Sharon Parq Associates, Inc.
Comments