How to save all worksheets as values only?
If you have a workbook which contains multiple formulas, now, you need to distribute this file to other users, you don’t want to show the formulas but only values be displayed. Normally, we can quickly save a worksheet as values by copying and pasting the data as values only. But, how could you save all worksheets as values only without copying and pasting one by one?
Save all worksheets as values only with VBA code
Save all worksheets as values only with VBA code
The following VBA code can help you to quickly save all sheets as values (no formulas) and preserve all cell formatting. Please do as this:
1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste the following code in the Module Window.
VBA code: Save all worksheets as values only:
Sub Saveasvalue()
'Updateby Extendoffice
Dim wsh As Worksheet
For Each wsh In ThisWorkbook.Worksheets
wsh.Cells.Copy
wsh.Cells.PasteSpecial xlPasteValues
Next
Application.CutCopyMode = False
End Sub
3. Then press F5 key to run this code, and the whole workbook has been saved as values only, all formulas have been removed at once only leave values with cell formatting.
Note: Before you apply the code, you can save a copy of the workbook first.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!










