Excel Macro: Deleting Formulas and Keep Data

This Excel VBA macro deletes formulas and keep the values.

Macro Example

Sub DeleteFormulas()

 Selection.Value = Selection.Valude

End Sub

Description

[Application.]Selection

  Selection...

The Application.Selection property returns a selected object.

Selection.Value

  Selection.Value...

The Range.Value property returns or sets a Variant value that represents the value of the specified range.

In this macro, I set it to the Range.Value so the formula will be removed.

Sub DeleteFormulas()

 Selection.Value = Selection.Valude

End Sub

Properties

http://www.relief.jp/itnote/archives/003686.php

Apply to

  • Excel 2013
  • Excel 2010
  • Excel 2007