SORTBY

Sorts the contents of a range or array based on the values in a corresponding range or array.

Sintaxe

SORTBY(Range; SortByRange1; SortOrder1 [; SortByRange2; SortOrder2 [; ...] ])

Range: The array or range to sort.

SortByRange1; SortByRange2;... : range 1, range 2,... are the arrays or ranges to sort on.

SortOrder1; SortOrder2;... : order 1, order 2,... are the orders to use for sorting. 1 for ascending, -1 for descending. Default is ascending.

note

Pódese omitir calquera dos argumentos opcionais. Un argumento opcional require que todos os separadores presentes estean presentes.


Exemplos

{=SORTBY(A2:C7;A2:A7;1;C2:C7;-1)}

Sort the range A2:C7 based on the first column in ascending order and third column in descending order.

Información técnica

tip

Esta función está dispoñíbel desde a versión 24.8 do LibreOffice.


Esta función NON é parte do estándar Formato Open Document para Aplicacións de Ofimática (OpenDocument), versión 1.3. Parte 4: Fórmula recalculada (OpenFormula). O espazo de nomes é

COM.MICROSOFT.SORTBY

Precisamos da súa axuda!