Keep a Running Total When an Input Cell Is Cleared in Excel
Question details
Keep a cumulative total after a new input value is cleared or reset to zero.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user enters new values and wants to add each one to an existing total without losing it when the input is reset.
- Observed behavior
- A normal formula recalculates from its current inputs and cannot retain an earlier result after an input is cleared.
Decide whether you can keep each entry in a transaction log or need to reuse a single input cell. If you use a macro, check that you are working in desktop Excel and can enable macros for a trusted workbook.
Keep a transaction log and calculate the total with SUM
Use a log when you want a reliable running total and a record of every entry without macros.
Enter your existing total in cell B1. If you are starting from zero, enter 0.
Enter the first new value in A2, then enter later values in A3, A4, and subsequent cells. Keep the entries instead of clearing them.
Enter =B1+SUM(A2:A1000) in B2. Extend the range if your log grows beyond row 1000.

Use a worksheet change macro to add and clear N1
Use this approach in desktop Excel when each entry must be added to X1 and the input cell N1 must then be cleared.
Track a running total with a transaction log in WPS Spreadsheet
Use WPS Spreadsheet to retain each entry and calculate a cumulative total with SUM, without relying on a self-referencing formula.
- 1. Open a spreadsheet: Open WPS Spreadsheet and create a workbook or open an existing Excel file.
- 2. Enter the starting total: Type the existing total in B1, or enter 0 if there is no starting balance.
- 3. Record new values: Enter each new value in column A, beginning with A2, and leave previous entries in place.
- 4. Add the total formula: Enter =B1+SUM(A2:A1000) in B2. Add future values in the next empty row and extend the range when needed.

Frequently Asked Questions
Why does my total change when I clear the input cell?
A standard formula recalculates using the current cell values. If the input is cleared, its previous value is no longer available to the formula. Keep the entry in a log or use a macro to store the updated total.
Can I use a formula that refers to its own cell?
That creates a circular reference. Excel can allow iterative calculation through File > Options > Formulas, but recalculation may add the same input repeatedly. A transaction log or worksheet change macro is more reliable.
Can the macro run in Excel for the web?
No. VBA macros require a supported desktop version of Excel. In Excel for the web, use a transaction log and a SUM formula instead.
How do I include an existing balance in the running total?
Enter the existing balance in B1, list new values starting in A2, and enter =B1+SUM(A2:A1000) in B2.




