Macro to Paste as Values in Excel


Paste as Values into the same worksheet


Sub PasteAsValuesSameSheet()
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = True
End Sub

Create a copy of the worksheet and Paste as Values


Sub PasteAsValuesToNewSheet()
Cells.Select
Selection.Copy
Sheets.Add After:=ActiveSheet
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues
Selection.PasteSpecial Paste:=xlPasteFormats
Application.CutCopyMode = False
End Sub

Create a copy of every worksheet and Paste as Values


Sub PasteAsValuesEveryWorksheet()
Dim X As Worksheet
Dim Y As String
For Each X In ThisWorkbook.Sheets
Y = X.Name
Cells.Select
Selection.Copy
Sheets.Add After:=ActiveSheet
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues
Selection.PasteSpecial Paste:=xlPasteFormats
Application.CutCopyMode = False
Sheets(Y).Select
Next X
End Sub

Leave a Reply

Your email address will not be published.Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.