← All how-to recipes

How to reverse the order of a list

✓ Verified in LibreOffice 25.8.7.3

Flip a column so the last value comes first — without sorting alphabetically.

The formula

AppFormulaNotes
Excel=SORTBY(A2:A4,ROW(A2:A4),-1)Excel 365/2021. Works for any values — it reverses position, not sort order.
Google Sheets=SORTBY(A2:A4,ROW(A2:A4),-1)Identical; SORT(A2:A4,ROW(A2:A4),FALSE) also works in Sheets.
LibreOffice Calc=SORTBY(A2:A4,ROW(A2:A4),-1)Needs LibreOffice 24.8+.

How it works

SORTBY sorts one range by another: here the list is sorted by its own row numbers in descending order (-1), which simply flips it — cherry, banana, apple. Unlike SORT, this preserves the original arrangement in reverse rather than alphabetizing. In older versions without SORTBY, =INDEX($A$2:$A$4,COUNTA($A$2:$A$4)-ROWS($A$2:A2)+1) filled down does the same.

Verified, not just documented

We ran =SORTBY(A2:A4,ROW(A2:A4),-1) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned cherry, banana, apple — exactly the expected result. Every formula here is confirmed by actually executing it.