← All how-to recipes

How to find the latest (or earliest) date in a range

✓ Verified in LibreOffice 25.8.7.3

Most recent activity, newest entry, next deadline — dates are numbers, so MAX and MIN do it.

The formula

AppFormulaNotes
Excel=MAX(A2:A100)Format the result cell as a date. MIN gives the earliest; MAXIFS adds conditions.
Google Sheets=MAX(A2:A100)Identical.
LibreOffice Calc=MAX(A2:A100)Identical.

How it works

Dates are day-count serials underneath, so the biggest number is the latest date — the verification's serials decode to July 1, June 15, and August 6, 2026, and MAX correctly picks August 6. The per-entity version is MAXIFS: =MAXIFS(A:A,B:B,"cust-42") finds a customer's most recent order. If MAX returns 0 or a 1899 date, the column is text-dates — convert them first (see the convert-text-to-date recipe).

Verified, not just documented

We ran =TEXT(MAX(A2:A4),"YYYY-MM-DD") in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 2026-08-06 — exactly the expected result. Every formula here is confirmed by actually executing it.