Fix Excel SCAN Running Total Returning Incorrect Results
Question details
The user needs to resolve an issue where a dynamic-array formula intermittently returns an incorrect running total.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Calculating a running total using complex dynamic-array functions including SCAN, LET, and SORTBY.
- Observed behavior
- The formula intermittently returns incorrect calculation results after new data is entered. The correct result only appears temporarily when the user manually re-enters the formula.
Ensure you have saved a backup copy of your workbook. Verify that your version of Excel supports dynamic arrays, as functions like SCAN and LET are exclusively available in newer Microsoft 365 builds.
Use Helper Columns as a Reliable Workaround
Since nested dynamic-array functions can trigger calculation bugs, breaking the formula into helper columns provides the most stable solution for running totals.
Combining LET, SORTBY, and SCAN in a single dynamic array can overwhelm Excel's calculation engine, leading to intermittent failures. Separating the logic prevents these cache errors.
Create a new column next to your source data. Use the SORT or SORTBY function independently to organize your data into the desired order without doing any calculations yet.
In the adjacent column, use a traditional running total formula with mixed references (e.g., =SUM($B$2:B2)) and drag it down, or apply a simplified SCAN function pointing only to the sorted array column.
If you want to maintain a clean spreadsheet interface, select the column headers for your helper columns, right-click, and choose 'Hide'.

Force a Manual Recalculation
A quick, temporary fix to refresh the dynamic-array calculation engine when a formula stalls after data entry.
Test in Safe Mode and Update Excel
Determine if the issue is caused by add-in conflicts or an outdated build of Microsoft 365.
Try WPS Office for Reliable Spreadsheet Calculations
If you are frustrated by intermittent calculation bugs in Microsoft Excel, consider switching to WPS Office. It provides a lightweight, highly compatible alternative for handling complex data and formulas without the hefty subscription fees.
- 1. Download and Install: Get the latest version of WPS Office from the official website and install it on your device.
- 2. Open your Workbook: Launch WPS Spreadsheets, click File > Open, and select your existing .xlsx file to continue working without interruption.

Frequently Asked Questions
Why does my dynamic array formula calculate incorrectly until I hit Enter?
This is often caused by a calculation cache issue in Excel's engine when using heavily nested dynamic-array functions like LET, SORTBY, and SCAN. Pressing Enter forces Excel to discard the cached result and rebuild the calculation tree for that specific cell.
Does running Excel in Safe Mode fix the SCAN running total bug?
Running Excel in Safe Mode helps determine if a third-party add-in is interfering with calculations. However, if the issue is a native dynamic-array bug, Safe Mode will not resolve it, and you will need to rely on a formula workaround.
Can the 'Open and Repair' feature fix this calculation issue?
Generally, no. Users often encounter a recovery error even on new empty workbooks when using Open and Repair for this specific issue. The problem stems from the active formula calculation logic in memory, not from structural file corruption.
How can I perform a running total without using the SCAN function?
You can create a running total using a mix of relative and absolute references, such as =SUM($A$2:A2). Drag this formula down a helper column to calculate the running total step-by-step, which avoids the complexities and potential bugs of dynamic arrays.




