To reverse the order of rows in Excel so that the top row becomes the bottom row and the bottom row becomes the top row, you can add a helper column with sequential numbers, sort by that column in descending order, and then delete the helper column. This works for any contiguous block of data, with or without headers, and takes less than a minute.
What You'll Need
- Your Excel workbook with the data you want to reverse.
- A blank column adjacent to your data (Excel will use it as a temporary helper column).
- Basic familiarity with sorting in Excel (the Sort dialog or the Sort buttons on the Data tab).
Step-by-Step
- Open your workbook and go to the worksheet containing the data you want to reverse. Make sure your data is in a single contiguous block—no completely blank rows or columns in the middle of the range.
- Insert a helper column immediately to the right of your data. For example, if your data occupies columns A through D, click on the column E header to select the entire column, right-click, and choose "Insert." This shifts your data right and creates a blank column E. (If your data is in column A only, you can use column B.)
- Number the rows in the helper column. In the first data row of the helper column (say E2 if row 1 is a header, or E1 if there is no header), type
1. In the cell below, type2. Select both cells, then double-click the small square at the bottom-right corner of the selection (the fill handle). Excel will fill the column with consecutive numbers down to the last row of your data. Alternatively, you can use the Fill Series command: select the range in the helper column, go to Home > Fill > Series, choose "Columns" and "Linear," set Step value to 1, and click OK. - Select the entire data range including the helper column. Click on the top-left cell of your data (e.g., A1) and drag to the bottom-right cell of the helper column (e.g., E10 if you have 10 rows). Or click anywhere in the data and press Ctrl+A twice (once selects the current region, the second time may select the whole sheet—so be careful; better to drag or use Ctrl+Shift+End after selecting the first cell).
- Open the Sort dialog. Go to the Data tab and click "Sort." In the dialog, under "Sort by," choose the helper column (it will appear as the column letter, e.g., "Column E" or the header name if you gave it one). In "Sort On," keep "Cell Values." In "Order," select "Largest to Smallest." If your data has a header row, make sure the "My data has headers" checkbox is checked so that the header row stays at the top. Click OK.
- Verify the reversal. Your rows should now be in reverse order. The original bottom row is now at the top (just below the header, if any), and the original top row is at the bottom.
- Delete the helper column. Click on the header of the helper column (e.g., column E) to select the entire column, right-click, and choose "Delete." Your data is now reversed, and the helper column is gone. If you gave the helper column a header, deleting the column removes it as well.
- Save your work. Press Ctrl+S to save the reversed data. If you want to keep the original order, save a copy of the workbook before reversing, or use Undo (Ctrl+Z) after deleting the helper column to revert.
Note: The exact menu labels (like "Sort" or "Fill") may differ slightly depending on your Excel version (Windows, Mac, or web) and your language settings, but the process is the same. On a Mac, the Sort option is under the Data tab as well, and the fill handle works identically.
Common Mistakes
- Forgetting to include the helper column in the sort range. If you sort only your data columns, the helper column numbers will not move with the rows, and the reversal will be incorrect. Always select the entire range including the helper column.
- Sorting by the wrong column. Make sure the Sort by dropdown is set to the helper column, not one of your data columns. Otherwise you might sort alphabetically or numerically by your data, which is not what you want.
- Not checking "My data has headers" when you have a header row. If you have a header and you forget to check that box, the header row will be sorted along with the data, and it will end up at the bottom. Always check that box if your first row is a header.
- Using the fill handle incorrectly. If you double-click the fill handle and Excel fills only a few cells, it may be because there are blank cells in an adjacent column. Make sure there are no blank rows in your data, or manually drag the fill handle down to the last row.
- Leaving the helper column in place. If you forget to delete the helper column, your data will have an extra column of numbers that you don't need. Delete it after sorting.
Tips
- Use a named header for the helper column. For example, type "Order" in the first cell of the helper column. That way, in the Sort dialog, you can select "Order" instead of "Column E," which is clearer and less error-prone.
- Reverse without a helper column using a formula. If you prefer not to use sorting, you can use the INDEX function. In a new sheet or a blank area, enter
=INDEX(A$2:A$10, ROWS(A$2:A2))for the first cell (assuming data in A2:A10) and drag down. This returns the last value first. However, this creates formulas, not static values, and requires copying and pasting as values if you want to remove the original data. The helper column method is simpler for most users. - Reverse multiple columns at once. The helper column method works for any number of columns. Just insert the helper column to the right of the last data column, number the rows, sort by the helper column in descending order, and delete the helper. All columns will reverse together.
- If your data has filters or tables, be careful. If your data is in an Excel Table (Insert > Table), sorting by the helper column will work, but you must ensure the helper column is part of the table. If you add a column to the table, it becomes a table column automatically. If your data has AutoFilters, sorting via the Sort dialog will override the filter, which is fine, but you may need to reapply the filter afterwards.
Troubleshooting
If the sort does not reverse the rows as expected: Check that you selected the entire range including the helper column. If you only selected the data columns, the helper column numbers will not move, and the sort will be based on the original order, which may not change anything. Re-select the full range and try again.
If the header row disappears: You likely sorted without checking "My data has headers." Undo the sort (Ctrl+Z), then repeat the sort and check that box. Alternatively, if the header is now at the bottom, you can cut it and paste it back to the top, but it is easier to undo and redo.
If the helper column numbers are not sequential: If you typed 1 and 2 and then double-clicked the fill handle, but it filled only a few cells, check for blank rows in your data. If there are blank rows, the fill handle stops at the first blank. Drag the fill handle manually to the last row, or use the Fill Series command.
If the sort dialog does not show your helper column: Make sure you have selected the entire range before opening the Sort dialog. If you have selected only one cell, Excel may not know the range. Click anywhere in your data, then press Ctrl+A to select the current region, and then open Sort.
If you accidentally deleted the wrong column: Use Undo (Ctrl+Z) immediately. If you have already saved and closed the file, you may need to restore a previous version from File > Info > Version History (if you use OneDrive or SharePoint) or from a backup.
If your data has merged cells: Sorting with merged cells can cause errors or unexpected results. Unmerge all cells in the range before sorting, or consider using a different method (like the INDEX formula) if merging is essential. Excel will often warn you about merged cells when sorting.
Frequently Asked Questions
Can I reverse the order of rows without changing the original data?
Yes. Save a copy of the workbook before reversing, or use the INDEX formula method in a separate sheet. The helper column method modifies the original data, so if you need to keep the original order, make a backup first.
Does this work for a single column of data?
Yes. Insert a helper column to the right, number the rows, sort by the helper column in descending order, and delete the helper. The single column will be reversed.
What if my data has a header row and I want to keep it at the top?
Check the "My data has headers" checkbox in the Sort dialog. Excel will then exclude the header row from the sort, keeping it at the top while reversing the data rows below.
Can I reverse rows in Excel Online (the web version)?
Yes. Excel Online supports the same sort functionality. Insert a helper column, number the rows, select the range, go to Data > Sort, choose the helper column, and sort largest to smallest. The interface is similar, though some menu labels may be slightly different.
Is there a way to reverse rows using a formula without sorting?
Yes. Use the INDEX function with ROWS. For example, if your data is in A1:A10, in B1 enter =INDEX(A$1:A$10, ROWS(A$1:A1)) and drag down to B10. This returns the values in reverse order. Then copy column B and paste as values if you want to remove the formulas.
What if my data has blank rows in the middle?
Blank rows can disrupt the fill handle and the sort. It is best to remove blank rows before reversing. If you cannot remove them, you can manually number the helper column, including the blank rows (assign numbers to the blank rows as well), and then sort. The blank rows will move accordingly, but they may end up in unexpected places. Consider filtering out blanks first.