Excel Macro to Paste Values in All Cells in All Worksheets

Excel Macro to Paste Values in All Cells in All Worksheets

February 29, 2016

Use this  macro in Excel to convert all of the formulas on all worksheets of a  spreadsheet to static values:

 

Sub Paste()
    Dim Sh As Worksheet
    For Each Sh In ThisWorkbook.Worksheets
        If Sh.Visible = True Then
            Sh.Activate
            Sh.Cells.Copy
            Sh.Range("A1").PasteSpecial Paste:=xlValues
            Sh.Range("A1").Select
        End If
    Next Sh
    Application.CutCopyMode = False
End Sub

 

 

Just insert it in a module in Visual Basic, and then go to View . . . Macros . . . View Macros and Run 'Paste'.   This macro was posted by Andrew Poulsom to this site:

 

http://www.mrexcel.com/forum/excel-questions/63213-visual-basic-applications-code-copy-worksheets-paste-values.html

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Please reload

Contact Me With Your Litigation Support Questions:

seankevinoshea@hotmail.com

  • Twitter Long Shadow

© 2015 by Sean O'Shea . Proudly created with Wix.com