Excel Invert Rows Order: Reverse a List Step by Step
In this article
To invert the row order in Excel, the quickest dependable method is to add a helper column of sequence numbers next to your data, fill it with 1, 2, 3 and so on, then sort the whole range by that column in descending order. The original order is preserved in your data plus a stable key, you never touch the values themselves, and it works in every version of Excel on Windows, Mac and the web. Two alternatives exist for different situations: a formula approach using INDEX and ROWS if you want a live reversed copy that updates, and a manual cut-and-paste if you have only a handful of rows and want no helpers at all.
This guide covers all three methods, plus the mistakes that turn a clean reversal into a scrambled mess. Menu labels can differ slightly between Excel versions and platforms, so if a button name looks different on your copy, look for the closest equivalent in the same tab.
What You'll Need
- Excel for Windows, Mac or the web (the helper-column and sort methods work the same everywhere).
- A worksheet with your data laid out in rows, ideally with a header row.
- Enough empty columns immediately to the right of your data for one helper column.
- A backup copy of the sheet before you sort, in case the range selection is off.
Step-by-Step
Method 1: Helper column plus descending sort (works for any size)
- Save a copy of the workbook first, or duplicate the sheet by right-clicking its tab and choosing Move or Copy. Sorting is easy to undo with Ctrl+Z (Cmd+Z on Mac) only until you do something else, so a copy is cheap insurance.
- Click the first empty cell directly to the right of your header row, in the row where the data starts. If your data ends in column F, use column G.
- Type the number 1 and press Enter. In the cell below, type 2.
- Select both cells, then drag the small square at the bottom-right corner of the selection (the fill handle) down to the last row of your data. Excel fills 3, 4, 5 and so on automatically. Alternatively, type 1 in the first cell, then type this in the second cell and drag down:
=G2+1(adjust the column letter to match yours). - Give the helper column a heading in its header cell, for example Order. A heading matters: it lets Excel treat the row as labels and keep it out of the sort.
- Click any single cell inside your data block. Do not select the whole block by hand yet.
- Go to the Data tab and choose Sort (not Sort A to Z). The Sort dialog opens with the range already expanded to include the helper column.
- Tick My data has headers if Excel has not done so already.
- Set Sort by to your helper column heading (for example Order), Sort On to Cell Values, and Order to Largest to Smallest. Press OK.
- Your rows are now reversed: the last row sits at the top and the first row at the bottom. Delete the helper column whenever you like, or keep it and hide it. Hiding is done by right-clicking the column letter and choosing Hide.
Method 2: Live reversed copy with a formula
- Click the first cell of an empty area on the same sheet, or a new sheet, where you want the reversed copy to appear.
- Type a formula that counts the rows and pulls them bottom-up. If your source data sits in
A2:A20and the output starts in row 2, enter in the output cell:=INDEX($A$2:$A$20,ROWS($A$2:$A$20)-ROW()+2). This reads the count of rows in the source, subtracts the current output row, and adds 2 to keep the numbering aligned. - Copy that formula across to the right to cover every column of your data, then drag it down to fill the same number of rows as the source.
- Check the top and bottom of the output against the bottom and top of the original. If the first output row shows a blank instead of the last source value, your range is one row too tall or the offset constant needs adjusting by one.
- When it looks right, copy the output, then use Paste Special > Values to replace the formulas with fixed values. That removes dependence on the source data, which matters if you plan to delete or re-sort the original.
Method 3: Manual drag for a short list
- Select the entire last row of data, including all its columns, by clicking the row header on the far left.
- Press Ctrl+X (Cmd+X on Mac) to cut.
- Right-click the row header of the first data row and choose Insert Cut Cells. The row moves above the original first row.
- Repeat for the second-to-last row, third-to-last row, and so on. This is only practical for maybe ten rows or fewer; beyond that, use Method 1.
Common Mistakes
- Sorting a single column instead of the whole block. If you select only column A and sort it large to small, the names reorder but the data beside them stays put, and every row is now wrong. Always click one cell inside the block and let Excel expand the range, or select the full rectangle including every column.
- Forgetting the helper column in the range. If the numbers stay outside the sorted range, they never line up with the data again and the sort is meaningless.
- Blank helper cells. Excel treats blanks as the largest values in a descending sort, so empty cells land at the top and look like corruption. Fill every row before sorting.
- Merged cells in the range. Merged cells break sorting and the sort dialog will warn you. Unmerge first, or the sort will silently fail or reorder only part of the data.
- Using formulas that point to fixed cells after a re-sort. Relative references in formulas move with their row and can end up pointing at the wrong row. Converting to values avoids most of this.
Tips
- If you only need to display the order reversed and still want the sheet sorted normally, apply Data > Sort with a custom list instead of editing anything, or keep a reversed copy on a separate sheet as a report view.
- Add a permanent ID column to your data (order number, date, invoice number). Then you can always restore the original order by sorting on that column, no matter how many times you shuffle things.
- For datasets that refresh from a query or Power Query table, do the reversal in the query editor with a row-index column and then sort descending there. That way the reversed order survives every refresh.
- If you need random order rather than reversed, add a helper column with
=RAND()and sort by it. Use Paste Special > Values afterwards so the random numbers stop changing.
Troubleshooting
If the sort does nothing, check for merged cells and for a filter that has hidden rows. Clear the filter with Data > Clear in the Sort & Filter group before sorting.
If the data looks reversed but some rows are out of place, you almost certainly sorted a range that started one row too high or too low, catching a header or dropping a data row. Undo immediately with Ctrl+Z, re-select, and confirm the range in the Sort dialog covers the header row and every data row.
If the numbers in your helper column run 1, 2, 2, 3 or repeat, the fill handle copied cells rather than filling a series. Hold Ctrl while dragging to force a series, or type the first two numbers clearly and drag both together.
If your formulas return #REF! or #VALUE!, the source range was changed after the formula was written, or a text value ended up in a numeric column. Check that the range in the formula still covers the full data block.
If everything is scrambled beyond a quick fix, close without saving and reopen, or restore from the File > Info version history if available. That is why the backup copy in step 1 is worth the ten seconds.
Frequently Asked Questions
Does reversing rows change my data or formatting?
No. Sorting moves whole rows as units, so values, cell formatting, borders and fills travel with their row. What can suffer is formulas that rely on relative cell references across rows, which may end up pointing at different cells after the reorder.
Can I reverse rows without a helper column?
Yes, with the INDEX and ROWS formula in Method 2, which builds a reversed copy in a new area. You cannot reverse in place with a formula alone, so you will paste the result as values and delete or ignore the original.
Will this work on Excel for the web or Mac?
Yes. The helper column, the Sort dialog and INDEX are all present on the web and Mac versions. The exact position of a button within the Data tab can differ slightly, and keyboard shortcuts use Cmd on Mac, but the steps are the same.
How do I restore the original order afterwards?
If you kept the helper column, sort it ascending. If you added a permanent ID such as an invoice number or timestamp, sort on that column ascending. Without either, use Undo before doing anything else, or reopen the saved copy.
Why did the last row end up in the middle?
Descending sort treats blanks and text differently from numbers. If the helper column has missing cells or a stray text value, those rows sort to the top rather than the bottom. Refill the column so every row has a number, then sort again.
Can I reverse just part of a table?
Yes, select only the rows you want reversed including every column, then sort that block by a helper column you add inside it. Be aware that sorting a subset can break row-to-row relationships with the rest of the table, so copy the subset out first if that matters.