Calculation Issues

How to Lock a Cell Value When Status Changes to FILLED in Excel

Steven ParkerSteven Parker Oct 26, 2026 868 views

Question details

The user needs a dynamic calculation based on the TODAY() function to stop updating and retain its last calculated number when a corresponding status cell is marked as 'FILLED'.

How to Lock a Cell Value When Status Changes to FILLED
Product
Excel / WPS Spreadsheet
Device & OS
not provided
Scenario
Tracking elapsed time or days dynamically and needing to permanently freeze the calculation count once a specific task is marked as completed or FILLED.
Observed behavior
The current formula (=$G$1-D2) constantly updates because cell G1 contains the volatile TODAY() function. The goal is to stop the update and keep the most recent numeric value (e.g., 95) when the cell in column C equals 'FILLED'.
Before you start

To allow a formula to reference its own cell without triggering a circular reference error, you must first enable 'Iterative calculation' in your spreadsheet settings.

Solution 1Recommended

Use a Self-Referencing Formula with Iterative Calculation

By enabling iterative calculations, you can use an IF function that refers to its own cell. This allows the cell to hold its current value indefinitely once the condition is met.

A self-referencing formula checks the status cell. If the status is 'FILLED', it outputs its own current value (locking it in place). If it is not 'FILLED', it performs the standard date math calculation.

1
Enable Iterative Calculation

Navigate to File > Options > Formulas (or Menu > Options > Calculation in WPS Spreadsheet). Check the box for 'Enable iterative calculation' and click OK.

2
Enter the self-referencing formula

Select cell E2 and input the formula: =IF(C2="FILLED",E2,$G$1-D2). Press Enter to apply.

3
Apply to the remaining rows

Click the small square at the bottom-right corner of cell E2 and drag the fill handle down to copy the formula to the rest of the column.

Use a Self-Referencing Formula with Iterative Calculation
Successful Value Lock: Once the status in column C changes to 'FILLED', the count in column E will permanently freeze at its last numeric value, even as the TODAY() function advances.
Efficient Spreadsheet Management

Easily Manage Complex Calculations with WPS Spreadsheet

WPS Office provides robust spreadsheet tools that seamlessly support iterative calculations, self-referencing formulas, and advanced conditional logic to streamline your task tracking and daily counts.

  1. 1. Open your tracking sheet: Launch WPS Spreadsheet and open the workbook where you are tracking your dynamic daily counts.
  2. 2. Access Calculation Options: Click on 'Menu' at the top left corner, select 'Options', and navigate to the 'Calculation' tab.
  3. 3. Enable iterations: Check the box for 'Iterative calculation' and click OK to allow self-referencing formulas to function properly.
  4. 4. Apply your IF formula: Enter the formula =IF(C2="FILLED",E2,$G$1-D2) directly into your target cell to freeze the required value.
100% compatible with Microsoft Excel formulas, functions, and formattingLightweight architecture ensures fast performance even with complex iterative calculations enabledIntuitive options menu makes adjusting calculation settings quick and effortlessBuilt-in advanced data processing tools available completely free of charge
microsoft office alternative - wps office

Frequently Asked Questions

Why do I get a circular reference error when using the self-referencing formula?

A circular reference warning occurs because your formula in cell E2 is telling the spreadsheet to look at cell E2 for the answer. To resolve this, you must enable 'Iterative calculation' in your spreadsheet's formula options, which tells the software how many times to calculate the loop.

Will this formula update if I type 'filled' instead of 'FILLED'?

Yes. The IF function in Excel and WPS Spreadsheet is not case-sensitive by default. Typing 'filled', 'Filled', or 'FILLED' will all successfully trigger the condition to freeze the cell value.

Can I use VBA to automatically lock the cell instead of using iterative calculations?

Yes. You can use a Worksheet_Change macro in VBA to monitor column C. When the code detects 'FILLED' being entered, it can automatically replace the formula in column E with its current static value, completely avoiding circular references.