Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. 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: Creating a Copy without Formulas.
Written by Allen Wyatt (last updated January 12, 2022)
This tip applies to Excel 2007, 2010, 2013, and 2016
John knows how to create a copy of a worksheet, but he needs to create a copy that uses only static values, not values based on formulas. He wonders if there is a quick way to make a copy (perhaps with a macro) that maintains all formatting and column widths, but has all formulas replaced with their results. For the work John does this would be very helpful in sending out worksheets to individuals outside his organization.
This task is rather easy to accomplish, with or without a macro. If you want to do it without a macro, follow these steps:
Figure 1. The Move or Copy dialog box.
That's it. Your newly created worksheet doesn't contain any formulas, only the results of the formulas in the original worksheet. If you prefer to use a macro-based approach, it only takes a few lines of code:
Sub CopyWorksheetValues() ActiveSheet.Copy Cells.Copy Range("A1").PasteSpecial Paste:=xlPasteValues Application.CutCopyMode = False End Sub
Of course, if you want to distribute only the results of your worksheet, you might consider simply printing a PDF file and then distributing it. The added benefit is that your recipients don't need to have Excel to view it. The downside is that if your worksheet is very large, a PDF file can be rather unwieldy.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12382) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Creating a Copy without Formulas.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 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 MoreExcel makes it relatively easy to copy worksheets to a different workbook. That doesn't mean it couldn't be made simpler ...
Discover MoreWorksheets are easily accessible in a workbook, but you may not want them to be so open. You can hide worksheets so they ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2021-09-08 05:19:49
Tina
Thanks so much for this. God bless you.
2021-06-29 15:35:53
Ali Abdullah
thanks a lot. it is useful
2020-11-17 08:40:59
RJ
I tried the Macro as shown. The result was that the copied tab in the new workbook retained formulas while the original tab in the original file had no formulas.
2019-08-01 17:01:38
Diego
Thank you!
2018-03-07 11:26:21
Peter Atherton
Edel,
Range("B6").Copy
[c8].PasteSpecial Paste:=xlPasteValuesAndNumberFormats
Copy from B6 to C8
2018-03-06 05:19:50
Steve Jez
Edel,
Proceed as above, after you have pasted values, do Paste Special and select Formats. All formatting returned as the original sheet.
2018-03-05 10:35:32
Edel
The source formatting is completely stripped still looking for a solution that takes away the formulas but leaves the formatting.
2017-10-07 07:04:02
Rajeev
Hi,
I am using below code to save date from one sheet to another sheet and it works fine. All i want is i want to copy only VALUES instead of formulas to other sheet. Any suggestion?
----------------------------------------------------------------
Sub Save()
Dim SourceRange As Range, DestRange As Range
Dim DestSheet As Worksheet, Lr As Long
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
'fill in the Source Sheet and range
Set SourceRange = Sheets("Invoice").Range("A1:J49")
'Fill in the destination sheet and call the LastRow
'function to find the last row
Set DestSheet = Sheets("Saved Copies of Invoices")
Lr = DestSheet.Cells(Rows.Count, "A").End(xlUp).Row
'With the information from the LastRow function we can
'create a destination cell and copy/paste the source range
Set DestRange = DestSheet.Range("A" & Lr + 1)
SourceRange.Copy DestRange
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
---------------------------------------------------------------------------------
pls help
2017-09-13 11:33:05
Eva
I have Excel 2016 I have done the move copy past values and all the formatting goes away. I have tried copying to clipboard but it gives an error message that states "We can't make this change for the selected cells because it will affect a PivotTable. I am trying to replace the pivot table in the new workbook so as to remove the link to the original file. I want a version that I can email out without the links. Can anyone assist me with this issue?
2017-07-10 10:39:06
Dennis Costello
In response to the concerns raised by both Bob and Steve Clark, a different approach may be in order. While I use the "Create a copy <of this tab into a New Book>" facility all the time, in this case I would instead follow these steps:
Create a new workbook (Ctrl-N, for instance, will create a new workbook Book1.xls in my version of Excel). If you need it to be .xlsx - notably because you anticipate having more than 256 columns and/or 65,526 rows - create a new Book1.xlsx.
In the source workbook and worksheet, use Ctrl-A to select All the data. Ctrl-C copies it to the clipboard.
Shift to the new, destination workbook and worksheet, position at cell A1. Paste-Special-Values, either via the mechanism that Allen specified, or by Alt-E-S-V (I do this a lot, so I've memorized the Paste-Special shortcuts).
What you'll be missing in this approach is the formatting that was present in the source range, including row heights and column widths, and Defined Names, all of which Allen's approach would have implicitly copied over. If you need the formatting you can do a second Paste-Special - this time with Formatting (Alt-E-S-T - it's not Alt-E-S-F because that copies over the formulae, which of course you don't want). If you need to copy over the Column Widths, that's yet another Paste Special (Alt-E-S-W). I'm not aware that there's a way to carry over the row heights - oddly that isn't a Paste Special option, at least not in the versions of Excel I've used. But Autofit Row Height (Alt-O-R-A) will set all the rows to the minimum height to fit their contents properly - leaving empty rows unchanged.
Clearly if you need all the formatting, Allen's approach is better than mine - but if like Steve the target worksheet doesn't have the data you need, then my approach will win out.
2017-03-07 17:36:38
Steve Clark
Allen...Works well except for one thing...if the formulas make use of VB macros (functions), they come over to the new workbook with #NAME? errors. Is there any way to bring these cells over as values also?
Thank You,
Steve C.
2016-11-17 11:50:26
Bob
I did all of the above and it didn't work. :-(. My Excel worksheet was exported from MS Dynamics as a static worksheet as I want to be able to edit the data but I still can't seem to be able to edit it despite trying many different types of copy and pastes.
2016-11-01 02:41:24
bobby
I have a work book in which user enter data in one sheet and extracted (after formatting, and parsing -- a report if you will) in another sheet.
The extraction is done via a Macro, so the user only clicks a button after data entry and gets the report in a second workbook named by date.
My problem. I want to protect the extraction sheet (report) so that a user can't inadvertently or intentionally change the formulas that build the report. But when the Macro runs it hangs up on the protected sheet, spinning or crashes. When I use the Unprotect.Sheet command it requires the password (which I'd like to insert automatically) and after the extraction it doesn't re-protect the sheet again -- at least not the way I tried to do it (via Macros).
So what am I missing?
And yes I realize I may be taking advantage here, but I'm getting desperate.
Thank you for your time.
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