How to Flip an Excel Sheet Upside Down by Reversing Rows

How-to basics · Updated November 20, 2026

To flip an Excel sheet upside down, reverse the order of its rows: add a temporary helper column, number the data rows from top to bottom, then sort the entire data range by that column from largest to smallest. This changes the row order while keeping each record’s cells together. Excel does not have a command that turns a worksheet grid upside down like a picture, so the steps below cover the usual meaning: putting the last row first and the first row last.

Before you begin, save a copy of the workbook or make sure you can undo your changes. Check that your data has one header row, that the records form a continuous range, and that you select every column belonging to each record when you sort. If you mean rotating text or an image rather than reversing records, see the notes below; those are different operations.

What You’ll Need

  • Excel for Microsoft 365 on Windows. The same basic sorting method works in current Excel for Mac and Excel for the web, though ribbon placement and dialogs can vary slightly.
  • A rectangular data range, preferably with a single header row and no completely blank rows or columns inside it.
  • A spare column next to the range for temporary row numbers. If there is no room, insert a temporary worksheet column or place the numbers in an unused column within the selected data range.
  • A saved backup or a clear way to undo the operation if the result is not what you expected.

Step-by-Step

  1. Identify the records and their boundaries. Decide which rows should be reversed and which columns belong together. For example, if each row contains a date, product, quantity, and total in columns A through D, treat A:D as one record range. Include all four columns in the sort, not just the date or one visible column. If row 1 contains column names, keep it as a header and reverse only the rows beneath it. Remove or account for blank rows inside the data because they can split the range into separate sections.
  2. Save a working copy. Use File > Save As to create a copy if the order matters or the workbook is important. Sorting changes the order of records throughout the selected range. You can often undo immediately with Ctrl+Z on Windows or Command+Z on Mac, but undo history can be lost after closing the workbook or performing other actions. A copy gives you a safer fallback.
  3. Add a temporary helper column. Insert an empty column directly next to the data, or use an unused column that you can include in the sort. Give it a clear heading such as Original Order. Do not put the helper values inside a separate, unselected area: they need to move with the corresponding records during the sort. If the data is an Excel table, add a new table column and use that column for the sequence.
  4. Number the data rows from top to bottom. Enter 1 beside the first data row and 2 beside the next one. Select both cells, then drag the fill handle—the small square at the lower-right corner of the selection—down to the last record. Excel extends the number series. Check the top, middle, and bottom of the helper column to confirm the values increase by one and that no row is missed. For a very large range, you can instead enter a formula and then turn its results into fixed values before sorting. With the first data row in row 2 and the helper column starting in E2, enter =ROWS($A$2:A2) in E2 and fill it down. The first result is 1; the twentieth data row returns 20. Before sorting, copy the helper cells and use Home > Paste > Paste Values so the sequence cannot recalculate as rows move.
  5. Select the complete data range, including the helper column. Include all records and every column that must stay attached to them. Include the header row if your range has one, but do not include unrelated notes or a second table below it. If Excel displays a Sort Warning after you start sorting, choose Expand the selection, not Continue with the current selection. Sorting only the helper column would separate the numbers from their records.
  6. Open the Sort dialog and identify the header. On the Windows ribbon, choose Data > Sort. In the Sort dialog, check My data has headers if the first row contains column names. In Sort by, choose the helper heading, such as Original Order. If Excel has treated the heading as a data value, cancel the sort and correct the header setting before continuing.
  7. Sort from largest to smallest. In the Order list, select Largest to Smallest, then select OK. The row with the highest helper number moves to the top, followed by descending numbers, so the original final record becomes the first record and the original first record becomes the last. Confirm that the header remains at the top and that details across each row still match.
  8. Remove the helper column and check the result. If the records are in the intended reverse order, delete the temporary helper column. Check the first and last records against the original order, and spot-check a few middle records. If you reversed the wrong range or separated any values, use Ctrl+Z on Windows or Command+Z on Mac immediately, then repeat the sort with the full range selected.

In Excel for Mac, the Data tab also provides sorting commands; choose the sort option that opens the sort settings, select the helper field, and set descending order. Excel for the web has sorting controls on the Data tab as well. Labels can vary by build, but the important settings are the same: sort the whole range by the helper numbers in descending order, and keep the header out of the data rows.

Common Mistakes

Sorting only one column. This is the most serious error. It reverses the numbers or dates in that column without moving their neighboring cells, so records become mismatched. Select the full rectangular range and choose Expand the selection if Excel asks. Afterward, verify a record by checking that its associated fields are still together.

Including the header as a record. If the header is numbered or sorted with the data, it may move to the bottom. Mark My data has headers in the Sort dialog, or select only the data rows and exclude the header. If you discover the problem after sorting, undo first rather than manually dragging the header back; the rest of the rows may also need correction.

Leaving blank rows inside the range. Blank lines can make Excel guess that the data ends early or divide one table into separate regions. Remove empty rows that are not meant to be records, or select the full intended range explicitly before opening the Sort dialog. Do not erase meaningful blank fields inside otherwise valid records; those are different from entirely empty separator rows.

Sorting a formula-based helper without fixing its values. A helper formula that counts its current position may recalculate after a sort, so it no longer represents the original order. For reliable results, use a number series or copy the filled formula column and paste values before sorting. The helper should be a stable set of numbers while the records move.

Forgetting hidden or filtered rows. A filter may mean that you are looking at only part of the data, and hidden rows can make the result surprising. Clear filters with Data > Clear if you intend to reverse every record, then check whether rows are hidden manually. If you only want to reverse a filtered subset, plan carefully: a normal sort can affect the underlying range rather than just the visible records.

Tips

Use a simple sequence of whole numbers rather than dates, names, or a column that already contains meaningful data. A dedicated helper makes the intended order obvious and avoids changing the meaning of existing fields. Give it a temporary heading so Excel recognizes it as a column and so it is easy to identify in the Sort dialog.

If your data is an Excel table, the filter arrows in its headings can sort a selected table column, but do not sort a column that contains the helper numbers alone. Use the table’s Sort dialog or sort by the helper heading while ensuring the entire table moves together. Remove the helper field after you have confirmed the reversed order; if you need to repeat this process later, keeping a permanent original-order ID can make that easier.

For a column of values with no related fields, select just the cells you want reversed, add the helper numbers beside them, and sort both columns together. Avoid selecting unrelated cells above or below the list. If the worksheet contains several separate tables, reverse each one independently rather than sorting the whole sheet as one block.

Keep a copy of the original sequence if you might need to restore it. The helper values preserve the prior top-to-bottom order, so sorting the same range by that column from smallest to largest puts it back in its original sequence—provided you kept the helper values and they remain attached to the records. This is more dependable than relying on memory or trying to reconstruct an order later.

If you literally want a visual object upside down, select the object rather than the worksheet cells. Excel can rotate pictures and shapes, but rotating a picture of a worksheet is not the same as reversing editable data. Text orientation is also separate: use Home > Alignment > Orientation to change the direction of text in selected cells, not to move rows. For a printout, changing page orientation through Page Layout > Orientation changes portrait or landscape layout, not the order of the rows.

Troubleshooting

The rows did not reverse. Check that the sort order was Largest to Smallest and that the selected Sort by field was the helper column. If you chose Smallest to Largest, the records remain in their original order. Undo, reopen Data > Sort, and verify both settings before selecting OK.

Only one field changed position. Undo immediately. Select the complete set of columns for the records, including the helper, and repeat the operation. When Excel warns that adjacent data exists, choose Expand the selection. If the warning did not appear, confirm the selection itself included every required column before sorting.

The header moved or became part of the numbering. Undo and open Data > Sort again. Turn on My data has headers if the first selected row contains headings. Alternatively, select only the data rows and sort without including the header. Never fix this by moving just the header cell after the sort, because the rest of the data may still be misaligned.

The helper numbers repeat, skip, or stop early. Check that the fill handle extended to the final record and that the number pattern began with 1 and 2. For formula-based numbering, confirm the formula was filled through the entire range, then paste values before sorting. If there are gaps in the dataset, make sure your selected range still covers every row you intend to reverse.

Excel sorts only part of a table or stops at a blank line. Cancel if possible, then select the exact range rather than relying on Excel to detect the table automatically. Remove unintended blank separator rows or convert a continuous range to a table using Insert > Table. Make sure the table includes all columns that belong to each record.

You wanted the columns reversed instead. The helper-column method reverses top-to-bottom row order. To reverse columns from left to right, place a helper sequence in a row above the data, select the full block, and use Data > Sort > Options > Sort left to right if that option is available in your Excel version. Sort the helper sequence from largest to smallest. Review the selection carefully so the column headings and associated values move together.

Frequently Asked Questions

Can I flip an entire Excel worksheet upside down with one command?
No. Excel does not provide a one-click command to rotate the worksheet grid 180 degrees. To reverse the order of records, use the helper-column sort. To rotate a picture or shape, select that object and use its rotation controls instead.

Will reversing the rows change the values in my cells?
Sorting moves cells and their contents; it does not intentionally change the underlying values. However, formulas, references, filters, and workbook features can affect what you see after a sort. Keep a backup, include the full related range, and check important formulas and totals when the sort is complete.

Can I reverse rows without a helper column?
Yes, if an existing column already records the original order and has unique values, sort the full range by that field in descending order. Otherwise, the temporary helper is the clearest way to define the exact reverse sequence. Sorting by names or dates will rearrange records by those values, not necessarily reverse their original positions.

How do I put the rows back in their original order?
If the helper column is still present with fixed original sequence numbers, sort the full range by it from smallest to largest. If you have not made other changes since the sort, Ctrl+Z on Windows or Command+Z on Mac is the quickest option. Without a saved sequence or undo history, Excel may not know the previous order.

Does this method work in Excel for Mac or the web?
Yes. Current Excel for Mac and Excel for the web support sorting ranges. The controls may be arranged differently from Excel for Windows, but use the same approach: add stable sequence numbers, select the entire range, and sort by that helper in descending order. If you do not see a particular dialog option, check that you are in the full sort controls rather than a quick column sort.

Can I reverse just the visible rows after applying a filter?
Do not assume a normal sort will rearrange only visible rows; it sorts the underlying data range. To reverse all records, clear the filter before sorting. If only a filtered subset should change, work on a copy or extract that subset to a separate range, reverse it there, and check the result before replacing any original data.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.