How to track a running maximum (record high so far)
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)A column showing the best value reached up to each row — peaks, records, high-water marks.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =MAX($A$2:A2) | Fill down; the half-anchored range grows one row at a time. MIN for a running minimum. |
| Google Sheets | =MAX($A$2:A2) | Identical. |
| LibreOffice Calc | =MAX($A$2:A2) | Identical. |
How it works
The expanding range $A$2:A2 is the whole trick (the same one behind running totals and running counts): each filled-down row computes MAX over everything from the top to itself. At row 4 the values so far are 10, 25, 18, so the record high is still 25 — the later 30 only shows up from its own row on. Flag NEW records with =A2=MAX($A$2:A2), which is TRUE exactly when a row sets a high.
Verified, not just documented
We ran =MAX($A$2:A4) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 25 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 25 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.
Functions used
MAX — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to calculate overtime pay
- How to calculate the range (max minus min)
- How to clamp (limit) a value between a minimum and maximum
- How to find the latest (or earliest) date in a range
- How to find the most common text value (mode for text)