How to reverse the order of a list in Excel
Excel formula
=SORTBY(A2:A9,SEQUENCE(ROWS(A2:A9)),-1)Sort by the row positions, largest first: =SORTBY(A2:A9,SEQUENCE(ROWS(A2:A9)),-1) returns the list from bottom to top.
- Result on the example
- a 8-row list that spills from C2 in
C2 - Works in
- Excel 2021, 2024 and Microsoft 365
- Google Sheets
- Different formula, see below
See it work
The formula is already in C2. Change any input and the result updates, or edit the formula to experiment.
How it works
SEQUENCE numbers the items 1 to 8 by position. Sorting the list by those numbers in descending order, -1, puts position 8 first and position 1 last. The items themselves aren't compared, so this works for text, numbers or dates. In Google Sheets, SORT takes the positions as its sort column.
=SORTBY(A2:A9,SEQUENCE(ROWS(A2:A9)),-1)Result{8 rows × 1 col} "Load the shelf", "Level the feet", "Turn it upright", "Tighten the bolts", …
A2:A98 rows × 1 col: "Unpack the box", "Check the parts", "Attach the legs", "Fit the shelf", …A range: 8 cells in one column.
ROWS(A2:A9)8ROWS: Number of rows in a range.- array
A2:A98 rows × 1 col: "Unpack the box", "Check the parts", "Attach the legs", "Fit the shelf", …
- array
SEQUENCE(ROWS(A2:A9)){8 rows × 1 col} 1, 2, 3, 4, …SEQUENCE: A grid of sequential numbers. Spills.- rows
ROWS(A2:A9)8
- rows
-1-1Makes the value negative.
SORTBY(A2:A9,SEQUENCE(ROWS(A2:A9)),-1){8 rows × 1 col} "Load the shelf", "Level the feet", "Turn it upright", "Tighten the bolts", …SORTBY: Sorts a range by other ranges. Spills.- array
A2:A98 rows × 1 col: "Unpack the box", "Check the parts", "Attach the legs", "Fit the shelf", … - by_array1
SEQUENCE(ROWS(A2:A9)){8 rows × 1 col} 1, 2, 3, 4, … - sort_order1
-1-1
- array
In Google Sheets
Google Sheets needs a different formula: =SORT(A2:A9,SEQUENCE(ROWS(A2:A9)),FALSE). On the same data it gives the same result. Here it is running in Google Sheets mode.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =CHOOSEROWS(A2:A9,SEQUENCE(ROWS(A2:A9),1,-1,-1)) | spills 8 × 1 | CHOOSEROWS accepts negative row numbers, counted from the end, so -1, -2, … -8 reads the list backwards. Works in Google Sheets too. |
| =INDEX(A2:A9,ROWS(A2:A9)+1-SEQUENCE(ROWS(A2:A9))) | spills 8 × 1 | For Excel 2021, which has SEQUENCE but no CHOOSEROWS. |
Common mistakes
- Sorting Z to A is not the same as reversing: it orders by the text, not by position.
- Typing the count,
SEQUENCE(8), breaks the formula when the list grows.ROWS(A2:A9)keeps it in step with the range.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Reverse the order of a list
C2, return the steps in A2:A9 in reverse order, last step first.Questions
How do I flip a row left to right?
Use CHOOSECOLS with negative numbers: =CHOOSECOLS(A1:F1,SEQUENCE(1,COLUMNS(A1:F1),-1,-1)).
How do I reverse text inside one cell?
Split it into characters and join them backwards: =TEXTJOIN("",TRUE,MID(A2,SEQUENCE(LEN(A2),1,LEN(A2),-1),1)).
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.