Replace Formulas with Values in an Excel Table Column Using VBA
Question details
Replace formulas with their current values in an Excel table column without looping through individual cells.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user wants a VBA macro to update an entire table column in one operation.
- Observed behavior
- The column should retain the current formula results as values rather than formulas.
Identify the worksheet code name, table name, and column name, and confirm that the formulas show the results you want to keep. If the workbook uses change events, check that their handlers can process a multi-cell target.
Assign the Excel table column's values to itself
Use one range assignment to replace formulas with their current results across the table column.
In Excel, press Alt+F11, then select Insert > Module.
Paste the following code into the module: Sub UpdateCells() On Error GoTo ErrorHandler Application.ScreenUpdating = False With Sheet1.Range("DataBase[status]") .Value = .Value End With Application.ScreenUpdating = True MsgBox "Done updating cells" Exit Sub ErrorHandler: Application.ScreenUpdating = True MsgBox "Update failed: " & Err.Description, vbExclamation End Sub
Replace Sheet1 with the worksheet's VBA code name and replace DataBase and status with your table and column names. The structured reference targets the column's data cells, not its header.
Return to Excel, press Alt+F8, select UpdateCells, and click Run. Select a previously calculated cell and check the formula bar to confirm it now contains a value.

Replace spreadsheet formulas with values in WPS Office
In WPS Spreadsheets, use Paste Special to replace a selected column's formulas with their displayed results without processing cells individually. This is a manual alternative, not an Excel VBA macro.
- 1. Open the workbook: Open your spreadsheet in WPS Spreadsheets and navigate to the table column.
- 2. Select the data cells: Select the cells containing the formulas to convert, excluding the header and any totals row.
- 3. Copy the selection: Press Ctrl+C or select Copy on the Home tab.
- 4. Paste values: With the same cells selected, open the Home tab's Paste menu, choose Paste Special, and select Values. Check a converted cell in the formula bar.

Frequently Asked Questions
Does the VBA assignment change the table header?
No. The structured reference DataBase[status] targets the data cells in that table column, not the header.
Do I need to calculate the formulas before running the macro?
Make sure the displayed results are current before running it. If needed, press F9 in Excel to recalculate, then run the macro.
Why might a worksheet change event cause an error?
The assignment can raise a change event for the entire column range. Check the worksheet's Worksheet_Change code in the VBA editor and make sure it handles a multi-cell Target.
Can I replace formulas with values without VBA?
Yes. Select the data cells, copy them, and use Paste Special > Values on the same selection in Excel or WPS Spreadsheets.




