×

Reverse List in Excel

What is Reverse list in Excel?

Microsoft Excel is widely used for calculation purposes like statistical and analytical for predicting and getting the result. Sometimes for calculation purposes, the user needs to shuffle the data or flip the order of the data upside down in a vertical dataset and left to right in a horizontal dataset, which means reversing the data or list. Doing manually take lot of time, and sometimes leads to error. Excel provides default function to reverse the list of data present in the worksheet using formulas, simple sorting trick or VBA. It provides default functions like INDEX, COUNTA, SORTBY, SEQUENCE and ROW functions for reversing the data present in the list. It provides several methods to use the reverse function with and without formulas. In this tutorial the various methods for reversing the list is explained clearly.

1. Reversing the list without using the formula

In the following method the data in the list are reversed without using the formula. If someone forgets the formula or function, easily this method can be applied for reversing the list or range.

  1. Enter the list of values in the spreadsheet. Here the values are entered from cell range A1:A10.
  2. From the cell B1:B10 enter the numeric value from 1 to 10 .Like ‘1’ in cell B1, ‘2’ in cell B2. Similarly follow this step up to value 10
  3. Select any of the data in the column B1:B10. Choose Data> Sort Descending to Ascending order in the ribbon tab in Excel
  4. The data in the column A2:A11 will change its order, and the values present in the column B2:B11 will also changes.
Reverse List in Excel
Reverse List in Excel

From the above worksheet, the data are reversed, where the value ‘A’ present in the bottom of the list while ‘J’ present in the top of the list. The numbers present in the column B2:B11 is called helper column, where it is used to reverse the order of the list.

2. Reversing the list using the formula

One can reverse the list using the Excel default formula. Here the combination of INDEX and ROWS function is used to reverse the list or range in Excel. To use this formula, following steps are followed.

  1. Enter the data in the worksheet in the required column.
  2. Select a new cell where the result wants to display and enter the formula as =INDEX (CELL RANGE, ROWS (CELL RANGE). Here the formula used are = INDEX ($A$2:$A$11, ROWS (A2:$A$11).
  3. It display the result in the cell B2. Drag the formula towards the cell B11. It will display the result in remaining cell. This process is called spilling. The process of spilling is done in Excel 365 and some advanced versions like Excel 2021.
Reverse List in Excel

From the above worksheet, the data is reversed using the function INDEX and ROWS. Here the data range containing the list A2:A11 becomes the first argument of the array function. To return the last element of the array, ROW function is used.

3. How to reverse the order using SEQUENCE, SORTBY and ROWS function together?

The list or range in the cell can be reversed using the Excel default function called SEQUENCE, SORTBY and ROWS function. It is called as Dynamic array formula which is used for quicker and efficient calculations .To use this function following steps are followed,

  1. Enter the data in the spreadsheet in the required column
  2. Select a new to create the sequence for the column range A1:A10. Enter the formula as =SEQUENCE (10, 1, 1, 1). The arguments present in the Sequence function is ‘10’ represents the number of rows, ‘1’ represents columns, ‘1’ represents the start, ‘1’ represents the step. It displays the sequence of numbers in the column B1:B10.
Reverse List in Excel

From the above worksheet, the sequence is created using the sequence function. The action of spilling is performed to fill the remaining cells.

  • Next use SORTBY function, by selecting a new cell and enter the formula as =SORTBY (A1:A10, B1:B10,-1). Here -1 indicates the values to be arranged from descending to ascending order.
Reverse List in Excel

Here the values are reversed using SORTBY function.

  • Next, use the SEQUENCE function inside the SORTBY function. Select a new cell and type the formula as = SORTBY (A1:A10, SEQUENCE (10, 1, 1, 1),-1). Here the arguments ‘10’ represents the rows, 1- column, 1- start, 1- step and -1 indicates the range to be arranged from descending to ascending order.
  • Next step involve the merging of ROWS function inside the formula. Select a new cell and type the formula as = SORTBY (A1:10, SEQUENCE (ROWS (A1:A10), 1, 1, 1),-1). The ROW function is used to count the number of rows in a range.
Reverse List in Excel

From the above worksheet, the SEQUENCE, SORTBY and ROWS function is used together to reverse the list or range in the table.

4. How to reverse the list of range using COUNTA function?

Excel default function called COUNTA is used to reverse the list or range in the table. The formula to be used is,

=INDEX (list, COUNTA (list) +ROW (list)-ROW (), 1).

To implement this formula, steps to be followed are,

  1. Enter the data in the worksheet in the required column.
  2. Select a new cell and type the formula as =INDEX (A1:A10, COUNTA (A1:A10) +ROW (A1:A10)-ROW (), 1). Here A1:A10 is considered as list.
  3. The result will be displayed in the cell.
Reverse List in Excel

From the above worksheet, the list is reversed using the formula INDEX, COUNTA and ROW. The name “list” is a named range, where it is an absolute reference by default. In this formula INDEX function acts as a important part of the formula, where it represents the list as an array of argument. The other part of the formula is called expression, which represents the correct row number in the formula.

COUNTA- It is used to represent the count of non-blank cell present in the list. In this example ‘10’ is represented as non-blank cell

ROW – It is used to represent the starting row number. For example, the row number here is 1.

ROW () - It represents the row number where the formula is present.

5. How to reverse the list horizontally?

Excel default functions or formula is used to reverse the column in a vertical manner. Similarly using this function, the data in the row can be flipped or reversed in a horizontal manner. To reverse the data horizontally, following steps are followed,

  1. Enter the data in the respective row. Here the data are entered in the row range namely A1:J1
  2. Enter the helper column number 1 to 10 in the row A2:A10.
  3. Select the value and helper column range ,here in the example the data range to be selected are A1:J2.
  4. Choose the Sort icon from the Data Tab. A dialog box will appear, in that select the option button. The sort option dialog box will appear, in that choose “Sort left to Right” option. Click OK.
Reverse List in Excel

From the above dialog box, click the “OPTION” button.

Reverse List in Excel
  • Click OK, after choosing the “Sort Left to Right button”.
Reverse List in Excel
  • From the above worksheet, choose the helper row in Sort by option. Here the helper row is present in row 2. Hence row 2 is selected. In order choose the “Largest to Smallest option”. Click Ok.
Reverse List in Excel

From the above worksheet, the data are reversed in the order.

Summary

From the tutorial, the various methods and functions to reverse the order is explained briefly.


Related Topics

Excel INT() Function

Excel INT() Function The INT() function in excel is used to round a number down to the nearest integer. It removes decimal points from any number value & return rounded down number value in...

1 minute read.

Excel MIN() Function

Excel MIN() Function The MIN() function in excel returns the smallest or minimum value from the provided numbers, named range or array. It ignores logical values and text. Syntax MIN(Number1,Number2, ...) Parameter Number1(required)- This parameter represents the...

1 minute read.

Excel MINUTE() Function

Excel MINUTE() Function The MINUTE() function in excel converts a serial number to minute (0 - 59). Syntax MINUTE (SERIAL_NUMBER) Parameter SERIAL_NUMBER (required)- This parameter represents the date or time from which you want to extract...

1 minute read.

Thermometer Chart in the Microsoft Excel

It was known that the thermometer chart is basically based on a single data point and that in turn could be used to show the achievement percentage. It primarily depends...

7 minutes read.

Excel COUNT() Function

Excel COUNT() Function The COUNT() function counts the number of cells in a range that contain numbers. Syntax COUNT([value1], [value [2], ...) Parameter value1(required)- This parameter represents the first cell in the range. value2, …(optional)- It represents the...

1 minute read.

Cells and Ranges in Excel

Cells and Ranges Each cell is identified by its cell address, which is a combination of the column and row on which that cell is situated. A group of cells together are called ‘Range’. When...

5 minutes read.

Spell Check in Excel

Spell Check in Excel Microsoft Excel facilities the complete features for examining the work with text. It provides the basic properties for the proper functioning of text, including the spell-check property. The...

5 minutes read.

Basics of Excel

Different ways to open an excel file There are various ways to open an excel file, some of them are listed below - From Start Menu:Go to the start menu and search for Ms-Excel...

5 minutes read.

Dependent Combo box in Excel VBA

Adding the particular dependent box in the created User form with the help of the Microsoft Excel VBA is considered essential and crucial in Microsoft Excel. Here, in this tutorial, we...

7 minutes read.

Excel RIGHT() Function

The RIGHT() function in excel returns the rightmost characters from a text value. This function is used for data manipulation. Syntax RIGHT(Text, [num_chars]) Parameter Text (required)- This parameter represents the string from which you want to find...

1 minute read.

Excel MID() Function

The MID() function in excel is used to return a specific number of characters from a text string starting at the position you specify. One can change the start of the string, thus...

1 minute read.

Excel OFFSET () Function

Excel OFFSET () Function The OFFSET() function in excel returns range of cells that is a specified number of rows and columns from an initial specified range. Syntax OFFSET (reference, rows, cols, [height], [width]) Parameter reference(required)-...

2 minutes read.

Excel LEFT() Function

The LEFT () function in excel returns the leftmost characters from a text value. This function is used for data manipulation. Syntax LEFT(Text, [num_chars]) Parameter Text (required)- This parameter represents the string from which you want to...

1 minute read.

Calculating Age in Excel

Microsoft Excel provides separate functions for various mathematical operations. Nowadays, Microsoft Excel is widely used by large and various organizations. Using formulas one can calculate the statistical functions quickly and...

2 minutes read.

Excel EDATE() Function

Excel EDATE() Function The EDATE() function in excel returns the serial number of the date that is the indicated number of months before or after the start date. Syntax EDATE(Start_Date, Month) Parameter Start_Date(required)- This parameter represents...

1 minute read.

Insert Row in Excel

It was known that we have various multiple ways that are extremely helpful in inserting a particular row in the Microsoft Excel. And we have lots of shortcut options available...

6 minutes read.

How to apply Advanced Filter in Excel

It was known that the advanced filter in Microsoft Excel is termed to be the next level filter option that is available in the particular "Data Menu Tab", which is...

7 minutes read.

How to create drop down in excel?

How to create drop down in excel? Drop-down lists are mostly used to facilitate data entry operations. They are commonly used in interactive websites or applications. Microsoft has expanded his Excel's data validation feature...

5 minutes read.

How to use Index and Match in Excel?

The Index and Match function is a familiar and frequently used function in Excel. It is one of the most powerful functions and is easy to use. By default, Excel...

6 minutes read.

Custom Sort Order in Excel

Microsoft Excel Worksheet is widely used for office, personal and various usages. The data present in the worksheet is a combination of numbers and alphabets. If the worksheet contains more...

3 minutes read.