Calculate a Running Total
Turn an ordered series of positive and negative movements into a cumulative balance by locking the first row and allowing the end of the SUM range to move.
| Calculate Running Total | ||||||||
| An expanding SUM range locks its first row and moves its ending row. | ||||||||
| Function review, mixed reference behavior | ||||||||
| Row | Amount | Formula syntax | Running total | Locked start | Moving end | Result | Behavior | |
| 1 | 120 | =SUM($B$12:B12) | 120 | $B$12 | B12 | 120 | First row | |
| 2 | -35 | =SUM($B$12:B13) | 85 | $B$12 | B13 | 85 | Expands one row | |
| 3 | 80 | =SUM($B$12:B14) | 165 | $B$12 | B14 | 165 | Includes three rows | |
| 4 | 50 | =SUM($B$12:B15) | 215 | $B$12 | B15 | 215 | Includes four rows | |
| Reliability checks | ||||||||
| Fourth running total equals SUM of four movements | OK | |||||||
Overview
Return the cumulative total after each row in an ordered series. Each copied formula produces one balance from the first movement through the current row, making the roll-forward visible at every period rather than only at the end.
When to use it
Use it for cash balances, inventory movements, headcount changes, cumulative sales or costs, and project burn. It fits data with one signed movement per ordered row and a clear starting point.
When not to use it
Use SCAN in Microsoft 365 when one formula must return a spilling cumulative array. Use a dedicated schedule when opening balances, multiple movement types, or period controls need their own coordinated logic. A plain total is enough when intermediate balances do not matter.
Problem
A normal full-range SUM returns only the final total. A copied fixed range repeats that answer, while a moving range calculates rolling windows instead of cumulative values. The first cell must remain fixed and the ending cell must advance with each row.
Source data
The synthetic source is ordered by week in Combined Example!A18:B23:
Period | Movement |
|---|---|
Week 1 | 120 |
Week 2 | -35 |
Week 3 | 80 |
Week 4 | 50 |
Week 5 | -20 |
Week 6 | 100 |
Movements are numeric and use positive values for additions and negative values for reductions. Row order is material. Duplicate amounts are allowed; blanks contribute nothing to SUM but can obscure the intended sequence.
Calculations
- Start the range at the first movement.
- Lock that first cell with absolute references.
- Leave the current-row endpoint relative.
- Fill the formula down so the range expands by one row each time.
- Reconcile the last balance to an independent SUM of all movements.
Outputs
The six formulas return 120, 85, 165, 215, 195, and 295. Each value is the cumulative balance through its row. The final result of 295 matches the independent total of all movements.
Formula map
=SUM($B$18:B18)
$B$18 stays fixed as the opening boundary. B18 is relative and becomes B19, B20, and so on when filled down. Copy the formula vertically alongside the ordered source; it does not spill.
Model checks
The workbook checks that the final running total equals a full-range SUM, the first total equals the first movement, and the final row equals the prior balance plus the current movement. Each test returns OK for the sample.
Edge cases
- Negative movements reduce the balance and can take it below zero.
- Sorting or reordering the rows changes every subsequent cumulative value.
- Blank numeric cells add zero but may break the visual continuity of the schedule.
- A nonzero opening balance should be a separate input or the first row in the sequence.
- Inserting data above the locked start requires a reference review.
Common errors
- Locking both ends: every row returns the same fixed total. Leave the ending reference relative.
- Leaving both ends relative: the range moves instead of expanding. Lock the first cell.
- Sorting only one column: periods and movements become mispaired. Sort the complete source table and recheck the roll-forward.
Example
Week 1 starts at 120. Adding Week 2’s -35 gives 85; adding 80 gives 165; then 50 gives 215; subtracting 20 gives 195; and adding 100 gives 295. Independently, 120 - 35 + 80 + 50 - 20 + 100 also equals 295.
Example workbook
Replace the cream movements in Combined Example!B18:B23; the live cumulative results sit in the adjacent column. Formula Review shows four stages of the expanding reference, and the checks confirm the start, roll-forward, and final reconciliation.
Key takeaway
Lock the beginning of the SUM range and let its endpoint move with the current row; that mixed reference is what converts a total into a cumulative sequence.