How can I reverse the order of rows in Excel? 2

How can I reverse the order of rows in Excel?

To reverse the order of rows in Excel, follow these steps:
1. Select the rows that you want to reverse by clicking and dragging your mouse over the row numbers on the left side of the Excel sheet.
2. Right-click on one of the selected rows and choose “Cut” from the menu.
3. Right-click on the row number where you want to insert the reversed rows and choose “Insert Cut Cells” from the menu.
4. The selected rows will now be inserted in reverse order.
5. To delete the original rows, select them and right-click, then choose “Delete” from the menu.
6. The rows will now be reversed in order.

Reverse Order of Rows in Excel (With Example)


You can use the following formula in Excel to quickly reverse the order of rows:

=SORTBY($A$2:$C$11,ROW(A2:A11),-1)

This particular example will reverse the order of rows in the range A2:C11.

The following example shows how to use this formula in practice.

Example: How to Reverse Order of Rows in Excel

Suppose we have the following dataset in Excel that contains information about various basketball players:

Suppose we would like to reverse the order of the rows in the range A2:C11, e.g. display the row with the Mavs as the last row and the row with the Jazz as the first row.

We can type the following formula into cell E2 to do so:

=SORTBY($A$2:$C$11,ROW(A2:A11),-1)

The following screenshot shows how to use this formula in practice:

Excel reverse order of rows

Notice that the formula reverses the order of the rows.

The first row has now become the last row.

The second row has now become the second to last row.

And so on.

How This Formula Works

=SORTBY($A$2:$C$11,ROW(A2:A11),-1)

This formula uses the SORTBY function, which uses the following syntax:

SORTBY(array, by_array, sort_order, …)

where:

  • array: The array to sort
  • by_array: The array to sort by
  • sort_order: 1 = ascending, -1 = descending

In the first argument, we specify that we’d like to sort the range A2:C11.

In the second argument, we specify that we’d like to use the row numbers of the range A2:A11 as the sorting values.

In the third argument, we use a value of -1 to specify that we’d like to sort by row numbers in descending order.

The end result is that we’re able to reverse the order of the rows in the range A2:C11.

Note: You can find the complete documentation for the SORTBY function in Excel .

The following tutorials explain how to perform other common tasks in Excel:

Cite this article

stats writer (2024). How can I reverse the order of rows in Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-reverse-the-order-of-rows-in-excel/

stats writer. "How can I reverse the order of rows in Excel?." PSYCHOLOGICAL SCALES, 22 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-reverse-the-order-of-rows-in-excel/.

stats writer. "How can I reverse the order of rows in Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-reverse-the-order-of-rows-in-excel/.

stats writer (2024) 'How can I reverse the order of rows in Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-reverse-the-order-of-rows-in-excel/.

[1] stats writer, "How can I reverse the order of rows in Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How can I reverse the order of rows in Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top