Hi Steven, ( http://www.deja.com/=dnc/getdoc.xp?AN=590705514 )
I would modify Nick Hodge's <nick_ho...@lineone.net> code
to default to the formula in the active cell to simplify entry. I would
also split up the inputbox so that the Cancel Button would function.
Sub purgeFormula()
'Nick Hodge 2000-02-28 excel.worksheet.functions
'convert specified formula to value, modified version
Dim purgeFormula As String
Dim x As Long
Dim rRange As Range
Dim myCell As Range
Set rRange = ActiveSheet.UsedRange
x = 0
'-------
purgeFormula = Application.InputBox("Enter the " & _
"formula to purge", "Formula", ActiveCell.Formula, , , , , 0)
If purgeFormula = "" Then Exit Sub
If Left(purgeFormula, 1) <> "=" Then Exit Sub
purgeFormula = Application.ConvertFormula(purgeFormula, xlR1C1, xlA1)
'-------
For Each myCell In rRange.SpecialCells(xlCellTypeFormulas)
If myCell.Formula = purgeFormula Then
myCell.Copy
myCell.PasteSpecial Paste:=xlPasteValues
x = x + 1
End If
Next myCell
MsgBox x & " occurrence(s) of the formula: " & purgeFormula & _
" have been converted to values"
ActiveSheet.Copy After:=Worksheets(Worksheets.Count)
End Sub