(I post this question because this one is closed but I feel it lacks a simple answer.)
There still is not a standard function, and the available tools don’t work in ‘Autocalculate’ mode.
What’s the best way to work around this fact will depend on some details, and in specific on the size of your task, and on the question if additional data (columns) shall be sorted along with the key, and if there is more than one key.
For a small number of datasets (rows mostly) you can do it based on:
- some helper columns. (Advantage: No array-evaluation needed.)
- complicated and inefficient formulae. (See the other thread.)
- user code internally relying on the available tools (via SearchDescriptor’, up to 3 keys).
- user coded function implementing one of the known sorting algorithms, and applied under array-evaluation.
Filtering may be added.
If you provide te needed details and a realistic example of your data, I may be able to suggest a solution.
Thank you, I wonder why this is not done by default by Calc…
A few ideas:
You found the interactive tools yourself and will surely experience their efficiency.
-1- Nonetheless doing sorts by functions in ‘AutoCalculate’ mode will gravely slow down the sheets as soon as larger datasets are to handle.
-2- To do sorting and filtering by tools instead of functions is a kind of standard. A function for the purpose would endanger compatibility.
-3- Where sorting and filtering is in the center of a use-case, a database might be the appropriate means.