You had your data neatly in order. But now, you need to flip it. What do you do? You don’t want to manually rewrite your entire list. Let’s examine exactly how to flip data in Google Sheets, also known as Google Sheets reverse order.
Flipping a column can occur for a few reasons. You might be trying to see your data in a new way, you might need to go through it in a different order, or you might have just realized you entered it in reverse. There are actually a few ways that you can reverse order in Google Sheets. You can flip it through the “Sort -> Range” function, through sort formulas, and through indexing.
Table of Contents
What is Reverse Sorting and Why Would You Need it?
Reverse sorting is simply changing the order of a column or range. For example, you could change the order from alphabetical A-Z to Z-A instead. There are plenty of reasons to do this, but the most common is for ease of reading or accessing certain data points.
In the below examples, we use elements as the subject. this makes it easy to see how sorting could become important. Sometimes you may need to have your columns in alphabetical order, but you could also need to sort by atomic number. Hopefully, you can see how this spills over into other areas of life. Product names and numbers for a store is another simple example of how this feature could be handy.
You may also have landed on this page looking for how to reverse the axis of your Google Sheet. You can do this by transposing, we cover it briefly in this article. You could also check out a full TRANSPOSE function guide instead.
Google Sheets Reverse Order: How to Flip Data in Google Sheets
In this article, we’ll begin with a list of elements (literally):
And we’re going to find a few ways to flip them.
When flipping data, do keep in mind that you often lose your initial data; this is what happens when sorting. So, you will want to save your progress before you start to change things. Luckily, Google Sheets has a lot of ways to revert to a previous state if you mess up!
Now, let’s take a look at how to flip data in Google Sheets.
Related: How to Sort by Date in Google Sheets
Method 1: Flipping a Sorted Column
This is by far the easiest method of flipping a sorted column, but it doesn’t always apply.
Let’s assume that our list of elements was sorted alphabetically.
If this was the case, we could reverse the column quite easily:
- Head to Data
- Click on Sort Range from Z to A.
(And if we wanted to flip it back, we could just use Data -> Sort Range from A to Z.)
That was easy. Now we have the exact reverse:
This is the best method possible because it doesn’t require you to create any additional columns or enter any formulas. It’s practically automatic.
This is what we mean by “flipping” a column. Putting it in the reverse order.
But your Google Sheets flip data isn’t always going to be ordered alphabetically. So, what can you do if your data is currently in arbitrary order?
Google Sheets can also reverse rows using the same method.
Related: Order Form Spreadsheet Templates
Method 2: Using a Count to Flip Your Column
Our elements are now ordered randomly:
(And, just in case you’re wondering, we did this by selecting them and going to Data -> Randomize Range)
But we want them to be in the exact opposite order.
What do we do?
Step 1: We set up a column to the left and then add numbers, 1 through 8.
Step 2: Then we select the entire two columns and then navigate to Data -> Sort Range
Step 3: Once there, we sort by Column A and we sort it Z -> A.
Optional Step 4: Everything is now appropriately flipped. If you want, you can now delete the second row.
Now, there is an obvious issue; what if the columns were much longer? You don’t want to be sitting there typing 1, 2, 3, 4, 5… up to 1,888.
You would make the second row “A2+1” (the above row +1) and then copy and paste it all the way down or use the fill handle. It’ll automatically update so all the numbers are just the subsequent number plus one — so you won’t need to manually type all the numbers down the line.
Method 3: Sorting the Column or Arrays Using the SORT Command
There’s another, cleaner method we can use; that’s using the SORT function. But it’s a little more difficult. Here’s how you do it with one simple step:
Step 1: We still need that line of numbers to the left. But then, in a third column, we enter the following:
You can see the algorithm and the results above. The SORT function is told that it is sorting column B and that it’s sorting column B by column A. It’s also told that it shouldn’t be in ascending order, but rather descending (“FALSE”). That’s because it’s already in ascending order.
This is a little cleaner because it shows the results right on the page. You end up with both the original data and the new data. But effectively, it still does the same thing as the last option — so if you prefer that option, there’s no reason not to use it.
Read also: Sort Horizontally in Google Sheets
Flipping Multiple Columns In Google Sheets
Consider that we might have more information. In the above examples, we’re flipping only a single column. But it’s more common that we would have not only multiple rows of data, but multiple columns of data. We would want to keep that data together when sorting — or the data wouldn’t make any sense.
Now we have the element, symbol, and atomic weight. They’re all correct, but if the elements were reordered, they wouldn’t be.
But as long as we select the entire range when we go to “Sort.”
…Everything will remain in order.
You absolutely must select everything within the sorted range, however. If we had selected only the element column, then only the element column would be swapped. The symbols and atomic weights would be wrong.
This is what separates Google Sheets from a relational database — there aren’t any relationships. The data isn’t related to each other, which also means that it can become disconnected.
Method 4: Reverse Rows in a Column Line by Line With the INDEX Function
Google Sheets can reverse columns with INDEX function. This function works under the following syntax:
INDEX(reference, [row], [column])
- reference is a range of cells to extract the data from
- row is the row number to extract data from.
- column is the column number to extract data from
Here’s an example of the Index function sorting a column:
As you can see the formula we used is:
You’ll notice that the only cell reference that isn’t in absolute values is A2 this allows the function to search out the place value of each other name when you use the fill handle.
Transposing a Column in Google Sheets
When we say “flip” we mean to “reverse” the order of the column. But when some people say “flip” they actually mean transpose, which is something else. Here’s how to transpose data in Google Sheets:
By typing in:
We could easily switch the data from a column to a row.
Actually, we could have transposed all the data, if we wanted to:
The TRANSPOSE function can be used to move from column to row and from row to column. It’s a very easy way to fix a sheet if you find that you oriented it incorrectly. And it’s something else someone might mean when they say “flip” a column.
Using Other Methods to Flip a Column
There are other ways that you can flip a column.
Realistically, if the column is short, it can be easier to just re-type the entire thing. But that’s not advised. The major issue with retyping the column is that it’s going to potentially introduce errors. You could forget an entry or you could accidentally overwrite an entry.
You can use other SORT functions and INDEX functions (which are significantly more complex). But they’re much more complicated and you’ll almost never use them. The above methods will help you flip any column — you shouldn’t need to use anything advanced.
Google Sheets Invert Selection FAQ
How Do I Reverse the Order of Data in Google Sheets?
There are a few different ways to reverse the order of data in Google Sheets. The most simple of which is to:
- Highlight the data you want to reverse
- Navigate to Data > Sort X by Y
How Do I Reverse a Code in Google Sheets?
You can reverse codes, text strings, and other data in Google Sheets, but it’s not easy. You could try out this formula as a method of how to flip cells in Google Sheets:
Just replace A2 with the cell reference of the data you want to reverse.
How Do I Reverse Rows and Columns in Google Sheets?
You can use the TRANSPOSE function to reverse rows and columns in Google Sheets. To do so:
- Type =TRANSPOSE
- Highlight the cells you wish to switch over
- Press Enter
How to Reverse Order in Google Sheets
If you need to sort a column that’s already in ascending or descending order, it’s almost universally going to be true that just using the Sort -> Range menu tool will work best. If you need to sort a column that’s in arbitrary order, adding a “count” column to one side will let you sort by range.
Now you know how to sort by Google Sheets reverse order. There are many ways to flip sheets, including flipping sheets by row rather than column — and a lot of it has to do with the embedded SORT function.