How to Reverse the Order of a List in Excel
By ExcelReady TeamUpdated 6 min read
The short answer
To reverse a list in Excel 2021 or Microsoft 365, use =SORTBY(A2:A7,SEQUENCE(ROWS(A2:A7)),-1). SEQUENCE numbers the rows 1, 2, 3 and SORTBY sorts by those numbers from largest to smallest, so the last item comes first. In older versions, fill down =INDEX($A$2:$A$7,ROWS(A2:$A$7)), or add a helper column of numbers and sort it Largest to Smallest.
Key takeaways
- Reversing a list is not the same as sorting it Z to A. Reversing keeps the original order, just upside down.
- In Microsoft 365, =SORTBY(list,SEQUENCE(ROWS(list)),-1) flips any list or table in one formula.
- In any version, =INDEX($A$2:$A$7,ROWS(A2:$A$7)) filled down returns the items from last to first.
- Without formulas, number the rows in a helper column and sort that column Largest to Smallest.
On this page+
To reverse the order of a list in Excel, you flip it so the last item comes first and the first comes last. In Microsoft 365 one formula does it, =SORTBY(A2:A7,SEQUENCE(ROWS(A2:A7)),-1), and older versions can use INDEX or a helper column. This guide shows each method on the same list, so you can pick the one that fits your Excel version and whether you want a formula or a one-off change.
Reversing is not the same as sorting Z to A#
Reversing keeps the items in their original order, just upside down. Sorting Z to A puts them in reverse alphabetical order, which is usually different. Here is a list of steps in a publishing process:
| Original (A2:A7) | Reversed | Sorted Z to A |
|---|---|---|
| Plan | Publish | Review |
| Draft | Approve | Publish |
| Review | Edit | Plan |
| Edit | Review | Edit |
| Approve | Draft | Draft |
| Publish | Plan | Approve |
If you want the most recent entry at the top of a log, or a process shown backwards, you need the Reversed column. The examples below all start from this list in A2:A7.
Method 1: SORTBY and SEQUENCE (Excel 2021 and Microsoft 365)#
The quickest way is to number the rows with SEQUENCE and sort by those numbers from largest to smallest. In C2, type:
=SORTBY(A2:A7,SEQUENCE(ROWS(A2:A7)),-1)Here is what each part does:
ROWS(A2:A7)counts the rows in the list: 6.SEQUENCE(6)makes the numbers 1 to 6, one for each row. See the SEQUENCE function for more uses.SORTBY(A2:A7, numbers, -1)sorts the list by those numbers.-1means descending, so row 6 comes first.
The result spills into C2:C7: Publish, Approve, Edit, Review, Draft, Plan. A spill is when one formula fills several cells; the article on dynamic arrays explains how it works. If you add items to the list, update the range or turn the list into a table.
This needs Excel 2021, Excel 2024 or Microsoft 365. For the difference between the two sorting functions, see SORT vs SORTBY.
Reverse a whole table#
The same pattern flips several columns at once. If A2:C7 holds tasks, owners and dates, use:
=SORTBY(A2:C7,SEQUENCE(ROWS(A2:C7)),-1)Each row stays together. Only the order of the rows changes.
Reverse a row instead of a column#
For data that runs across, build the numbers across too. SEQUENCE takes rows first, then columns:
=SORTBY(A1:F1,SEQUENCE(1,COLUMNS(A1:F1)),-1)The result spills to the right, starting with the item from F1.
Method 2: INDEX with SEQUENCE#
INDEX returns the item at a position, so you can ask for positions 6, 5, 4, 3, 2, 1. SEQUENCE can count backwards when you give it a start and a step:
=INDEX(A2:A7,SEQUENCE(ROWS(A2:A7),1,ROWS(A2:A7),-1))SEQUENCE(6,1,6,-1) means 6 rows, 1 column, start at 6, step -1. So it makes 6, 5, 4, 3, 2, 1, and INDEX returns the matching items. The result is the same as Method 1.
In Microsoft 365 and Excel 2024, CHOOSEROWS does the same job, because negative numbers count from the end of the list:
=CHOOSEROWS(A2:A7,SEQUENCE(ROWS(A2:A7),1,-1,-1))Method 3: INDEX and ROWS for older Excel#
In Excel 2019 and earlier, there is no SEQUENCE or spill. Instead, write a formula that you fill down, where the position gets smaller on each row. In C2, type:
=INDEX($A$2:$A$7,ROWS(A2:$A$7))Then fill it down to C7 (Windows: Ctrl+D; Mac: ⌘D).
The trick is the half-locked range in ROWS. In C2, ROWS(A2:$A$7) counts 6 rows, so INDEX returns item 6, Publish. In C3 the formula becomes ROWS(A3:$A$7), which counts 5, so it returns Approve. The locked end, $A$7, stays put while the start moves down.
Stop filling at the last row of the list. If you go further, the range turns around and the formula starts repeating items from the top, with no error to warn you.
Method 4: a helper column and Sort (no formulas)#
If you just want to flip the data once, sort it by a column of row numbers:
- Insert an empty column next to the list and type 1 in the first row and 2 in the second.
- Select both numbers and double-click the fill handle to number every row.
- Click any number in the helper column.
- Go to Data > Sort Largest to Smallest (the Z→A button).
- Delete the helper column.
Excel expands the selection to the whole table, so each row moves together. This changes the original data, so save a copy first if you need the old order. It works in every version, including Excel for Mac and Excel for the web.
Which method should you use?#
Use a formula when the list will change and you want the reversed copy to update. Use Sort when you want to change the data itself, once.
| Situation | Best method |
|---|---|
| Microsoft 365 or Excel 2021, list may change | SORTBY with SEQUENCE |
| Excel 2019 or earlier, list may change | INDEX with ROWS, filled down |
| One-off flip of the data itself | Helper column and Sort |
| Reverse a whole table in Microsoft 365 | SORTBY with SEQUENCE on all columns |
If you need a fixed order that isn't alphabetical or reversed, such as High, Medium, Low, see sorting by a custom order with a formula. For everyday sorting by values, the guide to SORT and SORTBY and the SORT function guide cover the options.
Common problems when reversing a list#
These are the issues people hit most often:
- Using SORT Z to A by mistake.
=SORT(A2:A7,,-1)gives reverse alphabetical order, not a flipped list. - Blank rows at the end. If the range includes empty cells, they come first in the reversed list and show as 0. Make the range end at the last item.
- #SPILL! The cells where the result should go are not empty. Clear them.
- #NAME? Your Excel version doesn't have SORTBY or SEQUENCE. Use the INDEX and ROWS method.
- A range that doesn't grow. New items below row 7 are left out. Format the list as a table (Ctrl+T; Mac: ⌘T) and refer to the table column instead.
Practise it#
Dynamic array formulas are easier to understand once you see them spill. Practise SORT and SORTBY in a live spreadsheet: you sort real lists and the sheet checks each formula instantly. Then try SEQUENCE and other new functions in the modern Excel functions lesson, or reverse the list in the exercise on this page.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Reverse the task list so Publish comes first. Click C2 and use SORTBY with SEQUENCE on A2:A7, sorting by row number from largest to smallest.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Task | Reversed | ||
| 2 | Plan | |||
| 3 | Draft | |||
| 4 | Review | |||
| 5 | Edit | |||
| 6 | Approve | |||
| 7 | Publish | |||
| 8 | ||||
| 9 | ||||
| 10 |
Tip: SEQUENCE(ROWS(A2:A7)) gives 1 to 6. SORTBY sorts the list by those numbers, and -1 means largest first.
Practise this in a lesson
Frequently asked questions
How do I flip a column upside down in Excel?
In Microsoft 365, use =SORTBY(A2:A7,SEQUENCE(ROWS(A2:A7)),-1). In older Excel, add a helper column numbered 1, 2, 3 next to the data, then sort by that column from Largest to Smallest.
Can I reverse a list with the SORT function?
Only if the list is already sorted. =SORT(A2:A7,,-1) sorts from Z to A, which rearranges the items alphabetically. To keep the original order but flip it, sort by row numbers with SORTBY.
How do I reverse the order of a row in Excel?
Use SEQUENCE with one row and as many columns as the data: =SORTBY(A1:F1,SEQUENCE(1,COLUMNS(A1:F1)),-1). The result spills to the right in reverse order.
Why does my reversed list show #SPILL!?
A dynamic array formula needs empty cells for its results. Clear anything in the cells below the formula, or move the formula to an empty area.