The formula
Running total (fill down)ExcelGoogle Sheets
=SUM($C$2:C2)In D2 → 120
Running total by category (fill down)ExcelGoogle Sheets
=SUMIFS($C$2:C2,$B$2:B2,B2)In E2 → 120
✓ Tested. All 10 Excel results in this example were recalculated in LibreOffice Calc 25.2 and matched the values shown.
Worked example
Paste the data below into a blank sheet starting at cell A1 (or download the cheat sheet, where every example is set up). Highlighted cells hold the formulas and show the expected results.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Date | Category | Amount | ||
| 2 | Mar 1, 2026 | Ads | 120 | 120 | 120 |
| 3 | Mar 2, 2026 | Fees | 30 | 150 | 30 |
| 4 | Mar 3, 2026 | Ads | 80 | 230 | 200 |
| 5 | Mar 4, 2026 | Stock | 400 | 630 | 400 |
| 6 | Mar 5, 2026 | Fees | 25 | 655 | 55 |
How it works
- $C$2
- Fixed start of the range.
- C2
- Relative end; becomes C3, C4… when filled down.
- $B$2:B2,B2
- Only adds rows above that share this row's category.
Common errors and fixes
Every row shows the same total?
Both ends are anchored ($C$2:$C$6). Remove the $ from the end.
Totals jump after sorting?
Running totals depend on row order. Sort by date first.
Does this work in Google Sheets?
Yes. The formulas on this page work the same way in Google Sheets.