Let's say I want Google Spreadsheets to automagically sort some data, for example column
C. How do I do that?
I know that I can manually sort data by right-clicking and selecting Sort data, but this is not what I'm looking for.
You can use the
For example, say I have Sheet1 with my data:
Then in Sheet2, cell A1, I would put this function:
This would show my data, but sorted by column C (the third column), ascending.
It is also possible to use Google Apps Scripts to achieve automatic in-place sorting of the data.
This may be more difficult to achieve and more error-prone (I'd still go for William Jackson's solution, +1 BTW), but I thought it was interesting enough to show.
I have a sheet that looks like this:
I added a new script, using these steps:
In the above script,
Your table will most likely differ from mine, so these values should be adjusted accordingly.
Here's a generic script that will autosort based on the 1st column, and assumes a Header row.
To create a script:
In the empty code window, paste the following code, which will run automatically whenever a cell is edited:
Another option without a script is:
The range is restricted (A1:C3) because where the order is ascending blank entries will appear first.
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?