Replace formulas with values on each sheet in workbook


Posted by Shanna on December 18, 2001 9:19 AM

Is there a way to write a macro that will copy and paste special - values so that all formulas are overwritten with values. I want to do this for each sheet in the workbook. Thanks :-)



Posted by Mark O'Brien on December 18, 2001 9:53 AM

Here is a macro that will cop and pastespecial for the every sheet in the workbook:

Public Sub PasteSpecial()

Dim Sht As Worksheet

For Each Sht In Worksheets
With Sht.UsedRange
.Copy
.PasteSpecial xlValues
End With
Next

End Sub