In this article, we will learn how to sort rows in google sheets.
Mostly we don’t sort rows, the general sorting is made according to columns data and not for rows, when you try to select a row and apply a normal sorting function on it, you will see it will be messed up. This is because the sort functionality is designed for columns only. But we have a manual method, or we can say a custom formula to sort our row or multiple rows accurately without messing it up. So today we will talk about that custom formula in this article, let’s go ahead,
If you have your data points in horizontal order and you want to sort them, then you can use the transpose function. Transpose function is nothing but a function that flip rows into columns, after transposing we will trigger a sorting function and then again, a transpose function to reset our rows. All these processes will work automatically in the background we just need to set up a transpose formula with the sort function to get our rows sorted accurately.
Let’s move to some basics and then we’ll move towards the practical procedure to learn how to sort rows in google sheets.
If you are interested to learn about how to sort pivot table in google sheets, please follow the link below.
Use Cases of Sort Rows in Google Sheets
Sorting data is very important either the data is small or large, sometimes we need sort function very frequently, so we may use auto sort, other times we are supposed to use various sorting functions to keep our data organized and arranged properly. We all have done a basic sort in our life, and it works on columns, really? can’t we sort horizontally? can’t we sort our rows? Unfortunately, we don’t have any built-in feature for sorting rows, because sorting is itself design for columns, so here we have a small trick to sort our rows accurately, a double transpose function with a sort function in between. It is very simple than it sounds like. We need to learn this function to sort our data horizontally in the form of rows without any tedious work.
- To sort single or multiple rows
- To sort data horizontally in any order
Download/Copy Practice Workbook
How to Sort Rows in Google Sheets
Open any data set with google sheets.
Now we want to sort this data horizontally not vertically. That means, we need to perform sort by rows in this case in google sheets.
Click any cell and start writing formula.
Write down the Transpose and Sort formula completely.
TRANSPOSE function in Google Sheets
- Transpose is the name of function
- Inside transpose sort function will be executed
- After sort we will repeat transpose to to reset to the original data
- Data range
- Row number
Hit Enter, and your data will be cloned with row-wise sorting.
How to Lock Rows in Google Sheets for Sorting
Locking rows when sorting is very easy method, you can freeze the rows or columns of your choice when sorting, so for this specific task – how to lock rows, we will select the row to be locked and then we will go to view in the main menu and then freeze, now we will select an option to lock the rows, if you want to select a header row then select any column in that row and then go to view and freeze and then freeze up to row 1. This is so simple.
- Understand all the arguments of the function properly
- Use true or false or ascending or descending order
- Must mention row number. In example row number is 2
- Never sort rows directly, it will mess up your data
In this article, we learned how to sort rows in google sheets, this is a comprehensive guide to completely learn about row sorting in google sheets, because row sorting is not straight forward, we need to understand some technical terms and then with the help of a custom formula we can get our rows sorted. I hope you find this article helpful. Please support us by sharing this article with your network.