Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Copying a Worksheet.
Written by Allen Wyatt (last updated June 18, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021
There are many times I have needed to duplicate a worksheet. Often it is because I have spent quite a bit of time developing a worksheet and I want to use it as a starting point for another. Excel lets you copy worksheets in the following manner:
Figure 1. The Move or Copy dialog box.
There is a faster way to copy worksheets in the same workbook. All you need to do is hold down the Ctrl key as you drag a worksheet tab to a new position in the workbook. Excel automatically copies the worksheet to the new position, leaving the old sheet intact.
There is also a "gotcha" here that you need to be aware of: Excel can sometimes balk if you try to copy a worksheet from a workbook saved in Excel's native format to a workbook that is saved in the older (pre-2007, XLS) format. This is because Excel can handle, currently, many, many more rows and columns in a worksheet than it could in earlier years. That means that when you try to transfer, Excel needs to let you know that it will truncate some data that may be in areas not supported in the earlier-formatted workbook.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12359) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Copying a Worksheet.
Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!
Excel allows you to easily add and remove worksheets from a workbook. You may want a way to automatically rename all of ...
Discover MoreExcel provides ways to reference the column or row number of a cell, but it doesn't provide a built-in way to reference a ...
Discover MoreExcel, by default, recalculates your worksheets as you make changes in those worksheets. If you want to limit the number ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2024-02-12 12:10:04
J. Woolley
My Excel Toolbox now includes the following function to return a range on any worksheet in the workbook:
=RangeOnSheet(Target, [Position], [Absolute])
For a complete description, see https://excelribbon.tips.net/T012141
Using RangeOnSheet, the formula in my most recent comment below can be replaced by the following:
=SUM(RangeOnSheet(C1:C9, -1))
See https://sites.google.com/view/MyExcelToolbox
2024-02-05 15:44:56
J. Woolley
Re. my most recent comment below, the final SUM formula should have been generalized by surrounding NameOfSheet with apostrophes in case the sheet's name includes a space character:
=SUM(INDIRECT("'"&NameOfSheet(-1)&"'!C1:C9"))
2024-02-05 14:52:52
J. Woolley
With my previous comment below, I realized the difficulty of preparing a formula that includes the name of a sheet based on its location in the workbook. So My Excel Toolbox now includes the following function to return a sheet's name using its position (even if it is hidden or very hidden):
=NameOfSheet([Position], [Absolute])
Position is the location of the sheet in the workbook or 0 (default) for the current worksheet. If Absolute is FALSE (default), Position is relative to the current worksheet. If Absolute is TRUE, Position is the absolute location of the sheet in the workbook (base-1).
Notice Excel's SHEET function returns the absolute position of a sheet, and the SHEETS function returns the number of sheets (including hidden or very hidden).
The SUM formula in my previous comment below requires the name of the sheet that precedes the current sheet; therefore, it can be simplfied as follows:
=SUM(INDIRECT(NameOfSheet(-1)&"!C1:C9"))
See https://sites.google.com/view/MyExcelToolbox
2024-02-01 16:34:34
J. Woolley
@John Schoonover
I assume the January sheet has a cell formula like this:
=SUM(December!(C1:C9))
where C1:C9 on the December sheet have values you want to total in the January sheet.
If you put the date of the 1st of each month in a cell like A1, then the value of A1 on the December sheet is 12/1/23 and the value of A1 on the January sheet is 1/1/24, etc. These should be constants or formulas, but don't use a function like TODAY().
Now change the formula on the January sheet to this:
=SUM(INDIRECT(TEXT(DATE(YEAR(A1),MONTH(A1)-1,1),"mmmm")&"!C1:C9"))
which calculates the December total the same as the original formula. When you copy the January sheet to make the February sheet, put 2/1/24 in cell A1 of the new sheet so that formula will calculate the January total.
Here is a breakdown of the formula:
DATE(YEAR(A1),MONTH(A1)-1,1) is the 1st of the previous month
TEXT(DATE(YEAR(A1),MONTH(A1)-1,1),"mmmm") is the previous month's name
TEXT(DATE(...),"mmmm")&"!C1:C9" is text like "December!C1:C9"
INDIRECT(...) converts that text into a Sheet!Range address
SUM(...) totals that Sheet!Range
Instead of entering a specific date in cell A1 when you create next month's sheet, here is a formula for cell A1 based on the sheet's name:
=DATEVALUE(MID(CELL("filename",A1),FIND("]",CELL("filename",A1),1)+1,10)&" 1")
This formula returns the date of the 1st of sheet name's month for the CURRENT year, but the year doesn't really matter in the previous formulas above.
See https://excelribbon.tips.net/T006145_Referencing_Worksheet_Tabs.html
2024-01-31 11:08:54
John Schoonover
I have a month of income and expenses on a worksheet that adds this month's income and expenses to last months from the previous worksheet to create a running total. When I copy January to create February Excel Copies the Totals as if they were Absolute references instead. February Total in the copied sheet looks at December. I need it to look at January.
Can you describe the fix?
2024-01-31 10:33:13
John Schoonover
I have a month of income and expenses on a worksheet that adds this month's income and expenses to last months from the previous worksheet to create a running total. When I copy January to create February Excel Copies the Totals as if they were Absolute references instead. February Total in the copied sheet looks at December. I need it to look at January.
Can you describe the fix?
2022-06-20 20:01:50
Tomek
@Ken Copenhaver
Your solution is not 100% equivalent to Ctrl+dragging the sheet, nor to the first method described by Allen. In particular it does not keep the sheet macros, like sheet event handlers. On the other hand, knowing that you can use the difference for your advantage.
Just as a point of interest, copying and pasting the all of the sheet works slightly differently than selecting, copying and pasting a smaller range. Among other things, the latter does not keep row heights and column widths.
2022-06-20 16:16:13
Ken Copenhaver
You can also simply select all the data in the worksheet to be copied (Ctrl + a) and copy/paste the data to a new worksheet.
2022-06-19 12:13:18
Tomek
Dragging the sheet with the mouse works also between two open workbooks, as long as they are visible on the screen. With Ctrl, it will create a copy in the destination workbook, renaming the sheet to avoid duplicates. Without Ctrl, it will move the sheet between workbooks. You can even move or copy several sheets at once, just select them first.
Beware that if you move all remaining sheets from a workbook, that workbook will automatically close.
These move/copy operations cannot be undone by Ctrl+Z.
Another gotcha is related to what happens to any existing named ranges, especially if they exist in both workbooks. But this is a whole different story.
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