To reverse an array in Excel, the most efficient method is using the SORTBY function combined with the SEQUENCE function. By creating a sequence of numbers that corresponds to the number of rows in your data and sorting that sequence in descending order, Excel will flip your list instantly. This approach is dynamic, meaning if you add data to your source list, the reversed list updates automatically without requiring manual re-sorting.

What You'll Need

  • A version of Excel that supports Dynamic Arrays (Microsoft 365 or Excel 2021 and later).
  • A dataset arranged in a column or a row (the array you wish to reverse).
  • A blank area of the worksheet where the reversed output can "spill" without being blocked by other data.

Step-by-Step

Depending on your version of Excel and whether you prefer a formula-based approach or a manual one, choose one of the following methods. Note that menu labels may differ slightly depending on your version, device, or region.

Method 1: Using the SORTBY and SEQUENCE Functions (Recommended)

  1. Identify the range of your data. For example, assume your data is in cells A2 through A11 (10 items).
  2. Select the cell where you want the reversed list to begin (e.g., cell C2).
  3. Enter the following formula: =SORTBY(A2:A11, SEQUENCE(ROWS(A2:A11)), -1).
  4. Press Enter. Excel will automatically "spill" the reversed array into the cells below.
  5. To understand how this works: ROWS(A2:A11) counts how many items are in your list. SEQUENCE creates a list from 1 to 10. SORTBY then takes your original data and sorts it based on that sequence in descending order (indicated by the -1), effectively flipping the list.

Method 2: The Helper Column Method (For Older Excel Versions)

  1. Insert a new blank column immediately next to the data you want to reverse.
  2. In the first cell of this helper column, type the number 1.
  3. In the second cell, type 2.
  4. Select both cells and drag the fill handle (the small square at the bottom-right of the selection) down to the end of your dataset. This creates a chronological index.
  5. Select both your data column and the helper column.
  6. Go to the Data tab on the ribbon and select the Sort button.
  7. In the Sort dialog box, choose the helper column as the "Sort by" column and select "Largest to Smallest" in the Order dropdown.
  8. Click OK. Your data is now reversed. You can now delete the helper column.

Method 3: Using the INDEX and ROWS Functions (The Classic Formula)

  1. Select the cell where you want the first reversed item to appear.
  2. Enter the formula: =INDEX($A$2:$A$11, ROWS(A2:$A$11)).
  3. Ensure you use absolute references (the dollar signs) for the range but a relative reference for the first part of the ROWS function.
  4. Drag the fill handle down for as many cells as there are items in your original array.
  5. The ROWS function calculates the distance from the current cell to the end of the range, which the INDEX function then uses to pull the corresponding item from the bottom up.

Common Mistakes

One of the most frequent errors is the #SPILL! error. This occurs when you use a dynamic array formula (like SORTBY) but there is existing data in the cells where the results are supposed to appear. Excel cannot overwrite existing data, so it returns an error. To fix this, clear all cells below and to the right of your formula.

Another common mistake is forgetting to lock cell references when using the INDEX method. If you use =INDEX(A2:A11, ...) instead of =INDEX($A$2:$A$11, ...), the range will shift downward as you drag the formula, leading to #REF! errors or missing data from the top of your list.

Users also frequently confuse the SORT function with the SORTBY function. While SORT organizes data based on the values within the array itself (alphabetically or numerically), SORTBY allows you to organize data based on a separate array (like the sequence of numbers), which is essential for reversing a list without changing the actual content of the data.

Tips

If you need to reverse a horizontal array (a row) instead of a vertical one, simply swap the ROWS function for the COLUMNS function. The formula would look like: =SORTBY(A2:J2, SEQUENCE(1, COLUMNS(A2:J2)), -1). Note the addition of the 1 in the SEQUENCE function to tell Excel to create the sequence across columns rather than down rows.

For those working with very large datasets, converting your source data into an official Excel Table (Insert > Table) is highly beneficial. If you reference the table name in your SORTBY formula (e.g., =SORTBY(Table1[Column1], SEQUENCE(ROWS(Table1[Column1])), -1)), the reversed list will automatically expand or shrink as you add or remove rows from the table, eliminating the need to update cell ranges manually.

If you only need to reverse the data once and do not need it to be dynamic, the Helper Column method is often the fastest for beginners because it requires no complex syntax and uses the standard user interface.

Troubleshooting

If the formula returns #NAME?, it is almost certainly because you are using an older version of Excel that does not support the SORTBY or SEQUENCE functions. In this case, you must use Method 2 (Helper Column) or Method 3 (INDEX/ROWS). These functions are only available in Microsoft 365 and Excel 2021 onwards.

If your reversed list contains zeros or empty cells that weren't prominent in the original list, check your range. You may have selected more cells than actually contain data. Adjust the range in your formula to match the exact boundaries of your dataset.

If the data is not reversing but is instead sorting alphabetically, double-check the last argument of your SORTBY formula. It must be -1 for descending order. If you put 1 or leave it blank, Excel defaults to ascending order, which will simply recreate your original list.

If the INDEX formula is returning the same value for every cell, check the ROWS part of the formula. Ensure the first reference is relative (no dollar signs) and the second reference is absolute (with dollar signs). For example: ROWS(A2:$A$11). This ensures the count decreases as you drag the formula down.

Frequently Asked Questions

Can I reverse an array without using a formula?

Yes, the most reliable non-formula method is the Helper Column approach. By assigning a number to each row and then sorting those numbers in descending order, you effectively reverse the array using only the built-in Sort tool.

Does this work for data across multiple columns?

Yes. If you select a multi-column range (e.g., A2:B11) in the SORTBY function, Excel will reverse the order of the rows while keeping the data within each row together. The sequence is applied to the row index, not the individual cells.

How do I make the reversed list permanent?

Because formulas are dynamic, the reversed list will change if the source changes. To make it permanent, select the reversed range, copy it (Ctrl+C), right-click the destination cell, and select Paste Values. This removes the formula and keeps only the resulting text or numbers.

Is there a way to reverse an array using VBA?

Yes, you can write a Macro to reverse a selection. However, for most users, the SORTBY function is significantly faster to implement and easier to maintain than writing and debugging a VBA script.

Will this method work in Google Sheets?

While the logic is similar, the specific functions differ. In Google Sheets, you can use the SORT function combined with SEQUENCE, or the QUERY function, but the exact syntax provided for Excel may require slight adjustments to work perfectly in a browser-based environment.