7
votes
How to reverse the order of selected rows?
Following Mir's example you may place SORT function into say cell D3 to reverse order for data in column C:
=sort(C3:C,A3:A,False)
7
votes
How can I make some data on a Google Sheets auto-sorting?
It can be done using Google App Script. The script will automatically sort whenever there is a change in sheet data.
On your Google Sheet:
Choose Tools –> Script Editor and paste the below script ...
6
votes
How to GROUP and ORDER data in a Google Spreadsheets?
Another way is from within the query:
=QUERY(Data!A1:B6;"select A, sum(B), count(B) group by A order by sum(B) desc")
5
votes
Accepted
Google Sheets, how to sort query results manually (Not in query)
you can't use Data > Sort sheet by...
your sheet needs to be manually sorted by creating a filtered view by selecting your column and then: Data > Filter views... > Create new filter view >...
5
votes
How to sort Trello cards by date added
You can use Butler for Trello, which is a bot that automates Trello (I'm the author). This command:
sort list "X" by time in list
sorts a list by the length of time that a card has been in the list. ...
4
votes
Sort Google Search results by date?
Rubén and infrcl have good answers.
Here is one way you can sort by date, using Search Query Parameters.
Assume you want the last two years sorted by date.
Search for your term, hit enter
You ...
4
votes
Accepted
Dynamically reference data from multiple tabs and sort it
Use curly brackets within this very simple query:
=QUERY({Alpha!A2:B;Beta!A2:B;Charlie!A2:B},"select * where Col1 <>'' order by Col2")
The trick here is the curly brackets {....} we ...
3
votes
Is there a way in Google Sheets to order blank cells first?
One easy way to make the blank cells appear at the top of the sheet when it is sorted is to enter a ' in the cell if it is currently supposed to have nothing in that cell. The ' will not show as text ...
3
votes
Accepted
How to use a query to find a row of same name but last entry, then copy a value next to it
Please use the following
(Adjust ranges to your needs)
=SORTN(QUERY({INDEX(ROW(D2:D)),D2:E},
"select Col2, Col3
where Col2 is not null
...
2
votes
Sorting unique rows by a related SUMIF column
I'm running into exactly the same thing, and I also did a workaround but I didn't make another sheet or use the QUERY() function.
I put the contents of my UNIQUE() function into a separate column, and ...
2
votes
Sorting title with numbers in Google Drive
It has been indicated on the Google Product Forum that if you were to put leading 0's as placeholders it will sort properly.
So in @Gavin Hudson's example if you created files with names starting:
...
2
votes
How to sort groups of rows in Google Sheets?
Short answer
The desired result could be obtained without scripting and this is recommended for cases where number of cells is small, especially if the OP don't know about scripting. To do so,
Add ...
2
votes
Sort Google Search results by date?
To add to https://webapps.stackexchange.com/a/89543 above, there is a hacky way to sort all Google search results from "Any time" by date so you get new results at top without using any time range.
...
2
votes
Accepted
Help with ordering a Google Sheets =QUERY
Both your syntax is wrong. Both shouldn't be working and they're not working. You just think that the first one is working.
ORDER by F will not and does NOT cause the parse error.
There should be no ...
2
votes
Google Sheets, how to sort query results manually (Not in query)
Keep your primary sheet as a main "level 1" sorting logic and
querying sheet.
Use ORDER BY in your first sheet.
Hide your first sheet.
Then pull your data to a second sheet with a simple ...
2
votes
Accepted
How Can I Sort a Data Range in Google Sheets Based on an Data Range?
Create and fill sort order numbers (column D on the screenshot)
Enter the following formula to cell F2:
=SORT(ARRAYFORMULA({$A2:A , IF($A2:A="", "", VLOOKUP($A2:A,$C$2:$D$8,2,FALSE))}),2,TRUE)
It ...
2
votes
Trying to run two scripts on same sheet and getting error
You're missing the text "function" in front of oneditfx1 and oneditfx1. Also, your huge if/else if statement could be simplified by using a switch statement and nesting furthers ifs within that.
2
votes
Google Sheets - Sort results of query by column B (count)
The select clause identifies "Col1" and "count(Col1)". So try order by on "count(Col1)":
"select Col1, count(Col1) where Col1 != '' group by Col1 order by count(Col1)...
2
votes
Sort Gmail *search results* oldest first
That option doesn't sort. When it is available it allows you to jump to the last page of search results.
I find that the option is valuable when the search is simple, you are getting all the messages ...
2
votes
ORDER BY generating error in Google Sheets' QUERY
In a query statement, the clauses must be given in the order specified in the query language help page. The order by clause must come after group by and before label, like this:
=query(
'Raw Data'!...
2
votes
Accepted
How to sort a list-like text in a cell?
Please see my important comment to your original post. However, if I go only by what is included in your post (i.e., that there is one cell with alphanumeric data wherein all numeric portions are ...
2
votes
Google Sheets keyboard shortcut: 'Sort sheet AtoZ or ZtoA' on current column?
To sort ascending by the current column, press Alt+Shift+D S A.
To sort descending by the current column, press Alt+Shift+D S Z.
See the keyboard shortcuts help page.
2
votes
Can I sort cells in Google Sheets with a key function?
You can achieve the desired result using built-in functions like this:
=sort(A1:D4,byrow(C1:D4,lambda(row,max(row))),0)
1
vote
Sorting a sheet without losing group order
First, insert a header row if you do not have one already. Then choose View > Freeze > 1 row and create sort keys with this formula in row 1 of a free column:
=arrayformula(
{
"Sort ...
1
vote
Auto sort script sorting different sheets by different columns
Try
Alice! A1:
=SORT('Master'!A1:D4,2,0)
Bernice! A1:
=SORT('Master'!A1:D4,3,0)
and so on..
1
vote
Can I sort rows in Google Sheets by date?
As the OP already figured out, sorting dates correctly on Google Sheets and other spreadsheet applications like Excel, require that dates are date values, not strings.
Using dates on the form '1/7' ...
1
vote
I need help with sorting query in Google Sheets
It seems you are sorting a single column when you need a pair to be sorted together. Taking what is on the left and clicking Sort as shown should return the order as shown on the right:
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
sorting × 141google-sheets × 99
formulas × 26
google-sheets-query × 20
google-apps-script × 19
google-sheets-arrayformula × 10
gmail × 8
vlookup × 4
google-sheets-filter × 4
youtube × 3
trello × 3
google-sheets-dates × 3
regex × 3
google-drive × 2
google-search × 2
google-forms × 2
gmail-labels × 2
office-365 × 2
youtube-playlist × 2
pivot-table × 2
excel-online × 2
google-docs × 1
twitter × 1
google-plus × 1
gmail-filters × 1