Clear formulae
"Trevor Shuttleworth" wrote in message
...
Paul
thanks for raising this ... worth being aware of. The alternative
approach
of copy / paste special values would also have the same effect. I
guess it
can be avoided by cycling through the cells with formulae but I
expect this
would be a little slower than the original suggestion.
Sub FormulaeToValues3()
Dim cell As Range
For Each cell In
ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormu las, 23)
cell.Value = cell.Value
Next
End Sub
I don't think you can apply formatting to cells with a formula in
them so
this should be safe.
Regards
Trevor
Trevor,
I didn't have any trouble with the Copy - Paste Special method either
(97 & 2000). I don't think you even need to use a loop in this
situation. Something like:
With ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormu las)
.Value=.Value
End With
should also work.
-Mike
|