Excel

TheSmallman.com

an XL ideas Lab

Dashboards VBA
  • Home
  • Dashboards
    • Tips & Tricks
    • Charts
    • Modelling
    • Infographics
    • VBA
  • Shop Dashboards
    • Power Pivot a User Guide
    • Excel Dashboard Course
    • Advanced Dashboard Course
    • Financial Modelling Course
    • Excel VBA Course
  • Blog
  • About
Menu

Excel Dashboards VBA

Street Address
City, State, Zip
Phone Number
an XL ideas Lab

Your Custom Text Here

Excel Dashboards VBA

  • Home
  • Dashboards
  • Excel Tips
    • Tips & Tricks
    • Charts
    • Modelling
    • Infographics
    • VBA
  • Shop Dashboards
  • PowerPivot
    • Power Pivot a User Guide
  • Courses
    • Excel Dashboard Course
    • Advanced Dashboard Course
    • Financial Modelling Course
    • Excel VBA Course
  • Blog
  • About

Convert Entire Excel Workbook to Values

March 12, 2019 Marcus Small
Excel Formuals to Numbers

So I have a very important Excel workbook and I need the original formula protected at all costs.  So I want a process that runs through all of the worksheets in the Excel workbook and converts everything from formulas to values.  This way none of the mechanics can be messed with in any way.  This is a bit like sending out a read only version of your work.  Or converting the whole thing to PDF.  There are many ways to skin the preverbal cat as it were.

Option Explicit

Sub ConverttoVals()
Dim sh As Worksheet

  For Each sh In Sheets
    sh.UsedRange.Copy
    sh.UsedRange.PasteSpecial xlPasteValues
  Next sh
Application.CutCopyMode = 0
End Sub


The For Each loop covers off all the worksheets in the workbook and the used range covers off only the used data in the workbook.  After this the paste special xl values takes over to finish the job.

The process runs reasonably quickly.  It will clear the file.  You want to make sure that you save the file as a different version and please have a back up just in case you accidently save the file.

Enjoy and I hope it has been useful.

Tags Excel, Convert, values, vba
← Convert Formula to Relative or AbsoluteEvaluate with Excel to Extract Sequence →

Featured Posts

Excel Dashboards: Tracking a Crisis

Excel Dashboards: Tracking a Crisis
April 14, 2020

Recent Posts

Populating an Excel Table from a Range of Cells with VBA

Populating an Excel Table from a Range of Cells with VBA June 12, 2025

Fuzzy Distribution with Randbetween

Fuzzy Distribution with Randbetween May 21, 2025

Add Minimum and Maximum for Chart in Cells

Add Minimum and Maximum for Chart in Cells March 12, 2025

Inflation Over Multiple Years in a Single Cell

Inflation Over Multiple Years in a Single Cell January 10, 2025

Hubspot Dashboard

Hubspot Dashboard October 3, 2024

Monthly Dashboard With Supporting Metrics

Monthly Dashboard With Supporting Metrics September 25, 2024

Excel Show Missing Sheet Tabs

Excel Show Missing Sheet Tabs July 29, 2024

Run Macro Overnight Automatically

Run Macro Overnight Automatically June 24, 2024

Split File into Parts and Save to Directory

Split File into Parts and Save to Directory April 20, 2024

Most Popular Author

Most Popular Author December 14, 2023

 

Follow US:

 
 

MarcusSmall@thesmallman.com

 

TheSmallman.com - Making your small systems hum...
© Copyright 2013-2024 theSmallman.com All Rights Reserved.