Fix an Excel VBA Macro to Copy Formula Results as Values
Question details
Copy the calculated result of a formula to another cell as a value using a VBA macro.

- Product
- Microsoft Excel VBA
- Device & OS
- not provided
- Scenario
- A macro needs to transfer the result of a formula in K5 to L15 without copying the formula.
- Observed behavior
- The existing copy-and-paste macro does not produce the intended value when the source cell contains a formula.
Open the workbook in desktop Excel and identify the source and destination cells. Make sure the workbook is trusted and macros are enabled, and recalculate the worksheet if the formula result may be outdated.
Assign the Formula Result Directly in VBA
Use direct cell assignment to transfer the calculated result without the clipboard or a second paste command.
The Value2 property reads the formula's current result rather than the formula itself. Unqualified Range references use the active sheet, so specify a worksheet if the macro must run on a particular sheet.
In desktop Excel, press Alt+F11, then open the module containing the existing macro or select Insert > Module.
Use this macro, adjusting the cell references as needed: Sub CopyValue() Range("L15").Value = Range("K5").Value2 End Sub
Return to Excel, select Developer > Macros, choose CopyValue, and click Run. Check that L15 contains the result from K5 as a value rather than a formula.
Select File > Save As and choose Excel Macro-Enabled Workbook (*.xlsm) to retain the VBA code.

Copy Formula Results as Values in WPS Spreadsheets
WPS Office is a free, lightweight Office alternative with a familiar interface and Microsoft Office format compatibility for an easy transition. WPS Spreadsheets can paste formula results as values, though it does not repair an Excel VBA macro.

Frequently Asked Questions
Why use Value2 instead of copying and pasting?
Range("K5").Value2 reads the cell's calculated result directly, so assigning it to L15 avoids the clipboard and does not copy the formula.
How do I make sure the macro uses the right worksheet?
Qualify both ranges with the worksheet, for example: Worksheets("Sheet1").Range("L15").Value = Worksheets("Sheet1").Range("K5").Value2. Replace Sheet1 with the actual sheet name.
Why does the destination show an old result?
The formula may not have recalculated. In Excel, use Formulas > Calculate Now, then run the macro again.
Can I paste a formula result as a value without VBA?
Yes. Copy the formula cell, select the destination, and use Home > Paste > Values in Excel. In WPS Spreadsheets, use Paste Special and select Values.




