How to Reverse Rows in Google Sheets Without Mixing Up Data
Reverse complete Google Sheets rows with SORT and ROW, use a fixed helper key for an in-place reversal, and filter blank records without separating fields.
To reverse rows in Google Sheets means changing the order of complete records while keeping each record’s values together. The safe way to do that is to sort by the rows’ original positions—not by a name, status, or ID column. An alphabetic sort can look tidy, but it does not necessarily produce the reverse of the current list.
This guide uses a small sample first, then shows a dynamic formula, an in-place helper-column method, and a version that ignores blank records. The formula method leaves the source untouched, which is usually the best starting point. If you need a permanent reordered list, paste the result as values after checking it.
Sample data
Assume row 1 contains headers and rows 2 through 6 contain the following values. Enter this tab-separated block in A1:C6:
RowID Name Status
101 Avery Open
102 Blair Pending
103 Casey Closed
104 Devon Open
105 Emery Pending
The current order is 101, 102, 103, 104, 105. The desired reverse order is 105, 104, 103, 102, 101. Names and statuses must travel with their RowID; reversing only column A would corrupt the records.
Method 1: reverse rows with SORT and ROW
This is the cleanest approach when you want a live reversed copy. Leave the source in A1:C6, copy the three headers to E1:G1, and put this formula in E2:
=SORT(A2:C6,ROW(A2:A6),FALSE)
The formula fills E2:G6 with five data rows. Including the headers you copied separately, E1:G6 should look like this:
RowID Name Status
105 Emery Pending
104 Devon Open
103 Casey Closed
102 Blair Pending
101 Avery Open
Do not include the source header in the formula’s data range. The formula starts in E2 and returns only the five data rows; it does not generate the header labels.
Here is what each part does:
A2:C6is the complete rectangular block to return. Because all three columns are included, each row stays associated with its original fields.ROW(A2:A6)supplies an external sort key with one value for every source row. Those values are 2, 3, 4, 5, and 6—the physical sheet positions, not the text in the cells.FALSErequests descending order. Descending physical row numbers put the last source row first.
Google’s SORT function documentation says that a sort column may be a range outside the data being sorted, provided it is one column with the same number of rows. That is why the five-row position key matches the five-row data range. Google’s ROW documentation explains how row references produce row numbers. This is a position key, not an alphabetical or numerical sort of your record contents.
In Google Sheets, many array results expand into neighboring cells automatically. Google notes on its ARRAYFORMULA page that many array formulas are automatically expanded. To make the row-key array evaluation explicit, you can also use:
=SORT(A2:C6,ARRAYFORMULA(ROW(A2:A6)),FALSE)
Both formulas need a clear output area. If E2:G6 contains existing values, the result cannot expand and Sheets reports an overwrite or array-result error. Keep the formula outside A2:C6 as well; putting it inside the range it reads creates a circular or overwrite problem rather than a reversal. Merged cells in the output area can also prevent expansion.
When the formula method is the right choice
Use it when you want the reversed view to update as the source changes. It is safer for an experiment because the original order remains available. The output is a new array of returned values; it does not duplicate the source’s formatting, comments, protections, or individual formulas. If source cells contain formulas, the output displays their calculated values rather than giving you independently editable duplicates of those formulas.
To freeze the current result, select E2:G6, copy it, and use Edit > Paste special > Values only in a separate, empty destination area. Check the first and last records before doing this. A pasted-values copy no longer updates when the source changes. IDs stored as text, including IDs with leading zeroes, should remain text if those zeroes are meaningful; do not retype them as numbers during the copy step.
Do not edit an individual cell inside the formula’s expanded result as if it were a normal copied record. Change the source value instead, or first create a values-only copy that you intend to edit independently.
Method 2: reverse the source in place with a fixed helper key
Use this method when the rows themselves must be reordered in the original range. First make a backup or duplicate the sheet. In D1 type OriginalOrder. In D2:D6 enter fixed values in the current order:
1
2
3
4
5
You can type them or generate them temporarily with =SEQUENCE(5). Google’s SEQUENCE documentation describes this function’s sequential-number output. If you generate the numbers with a formula, copy the generated results and paste values only back into D2:D6 before sorting. The helper must record the order at the moment you start, not recalculate new positions after a sort.
Select the whole range A1:D6—not just column D. Then choose Data > Sort range > Advanced range sorting options. Turn on Data has header row, choose OriginalOrder (column D), select descending order, and click Sort. Google’s Sort & filter your data guide documents this menu path and the header-row option. These instructions refer to the desktop web interface; mobile menus can differ.
The result in A2:C6 is now 105 through 101, with each name and status attached to the correct ID. Column D shows 5, 4, 3, 2, 1. Keep D until you have checked the result. Sorting the entire range by that same fixed helper in ascending order restores the recorded original sequence. You can remove the helper afterward if you no longer need that restoration option.
Do not sort only column D and then try to use it to rearrange the rest. That detaches the helper numbers from the records. Do not rely on a helper formula such as =ROW() when you need to restore the old order later: after rows move, row numbers recalculate to the new positions. Typed or pasted values are deliberately fixed.
In-place sorting can affect more than appearance. References to particular cell addresses may not represent the logical record you intended after reordering. Review dependent formulas, charts, filters, named ranges, and protected areas. If the sheet is shared or operational, separate formula output is usually less disruptive than moving the source records.
Skip blank records with a matched FILTER key
If your data area is larger than the current list, use bounded ranges and apply exactly the same nonblank test to the rows and the row-number key. For example, if A2:C100 is the working area and a valid record always has an ID in column A, put this in E2:
=SORT(FILTER(A2:C100,A2:A100<>""),FILTER(ROW(A2:A100),A2:A100<>""),FALSE)
The first FILTER removes rows whose required ID is blank. The second produces row numbers only for those same rows. SORT then reverses the remaining records by their original sheet positions. If only IDs 101, 102, and 105 remain in their sample positions while the other records are blank, the output is 105, 102, 101—not a padded five-row result.
The filters must use the same mask. Google’s FILTER function documentation says conditions must correspond to the range and have the same length. Do not filter the data by one criterion while sorting a different-height key; that creates range-size errors or unintended results.
Choose the blank policy deliberately. This formula drops a row whenever column A is blank, even if that row has a name or status. If column A is not your required field, change both nonblank conditions to the column that defines a valid record. Keep the data and position-key ranges aligned. A cell containing spaces is not the same as an empty cell, so clean or explicitly handle whitespace-only IDs if those occur in your data.
The range stops at row 100 intentionally. Records added after that boundary are not included until you extend both ranges. If no rows satisfy the condition, FILTER returns #N/A. Do not hide that error with IFERROR until you have decided how an empty dataset should be represented.
Common mistakes to avoid
Sorting by a record field. SORT(A2:C6,1,FALSE) sorts by RowID descending. That happens to match this sample’s reverse order because the IDs rise with the rows, but it will not reverse an arbitrary list. Sorting names Z-to-A is not the same as reversing the existing order unless the list was already alphabetized A-to-Z.
Including headers or totals as records. Keep the header outside the formula’s data range. In the menu method, select the header with the range and mark the header option. A totals row at the bottom also needs to stay outside the reversed record block unless you genuinely want it moved.
Reversing one column. A row is a record. Always return or sort the entire rectangular range, including columns that are easy to overlook, such as dates, notes, checkboxes, and hidden helper fields.
Transposing the range. Transpose changes rows into columns; it does not reverse their order. Reversal changes the order of complete rows without changing their field layout.
Overlooking filters or hidden rows. Before an in-place operation, inspect whether a filter or filter view is active. Decide whether your intended dataset is every source row or a selected subset. For a predictable reversal of all records, work from a clean, unfiltered copy. Do not assume an operation on a visible selection behaves like reversal of the complete range.
Ignoring regional formula separators. If your spreadsheet locale expects semicolons instead of commas, replace the argument separators accordingly. If you get a formula parse error, check separators and matching parentheses before changing the logic.
Verify the result before you trust it
Check the first output ID against the last source record and the last output ID against the first source record. For the filtered version, compare against the first and last records satisfying the required-ID rule. Then spot-check complete records: 105 must still be paired with Emery and Pending, while 101 must still be paired with Avery and Open. Count source and output records, excluding headers and any rows intentionally filtered out.
A useful property test is reversibility: reverse the output again using the same position-key idea and it should return the original sequence. Duplicate names or statuses should not disappear, and meaningful blank fields inside valid records should remain attached to their IDs. This is why checking entire records is more reliable than checking only the first column.
If a formula reports a mismatched range size, compare the start and end rows of the data and key. If it reports an expansion error, clear the destination rather than deleting source records. If results stop updating, check whether you are viewing the live formula output or a values-only snapshot.
For related work, see the Excel guide to reversing text, letters, words, and lists. For plain text rather than spreadsheet records, the reverse line order guide explains moving complete lines. The Text Reverser tool is useful for individual text samples, not a replacement for keeping spreadsheet columns linked.
The central rule is simple: reverse complete rows using their original positions, keep headers and totals separate, and verify the record associations before replacing anything important.
Try the Text Reverser tool
Reverse text, words, or letters instantly — free and entirely in your browser.
Open the tool