← All how-to recipes

How to find the position of the maximum value

✓ Verified in LibreOffice 25.8.7.3

Which row (or item number) holds the largest value — the rank position of the peak.

The formula

AppFormulaNotes
Excel=MATCH(MAX(A2:A6),A2:A6,0)MAX finds the value; MATCH returns its position in the range (1-based). Use MIN for the smallest.
Google Sheets=MATCH(MAX(A2:A6),A2:A6,0)Identical.
LibreOffice Calc=MATCH(MAX(A2:A6),A2:A6,0)Identical.

How it works

MAX(A2:A5) finds the biggest value (95) and MATCH returns its position within the range — 2, because 95 is the second item. This is the position WITHIN the range, not the sheet row; add the range's starting row minus one if you need the absolute row number. Feed the position into INDEX to pull a corresponding label (see find-the-value-corresponding-to-the-max). If several cells tie for the maximum, MATCH returns the first one's position. Swap MAX for MIN, or MAXIFS/MINIFS, for the smallest or a conditional peak.

Verified, not just documented

We ran =MATCH(MAX(A2:A5),A2:A5,0) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 2 — exactly the expected result. Every formula here is confirmed by actually executing it.