ORDENAR.POR

Ordena o conteúdo de um intervalo ou matriz com base nos valores de um intervalo ou matriz de valores correspondentes.

Sintaxe

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

Intervalo: A matriz ou intervalo a ser ordenado.

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

Any of the optional arguments can be omitted. An optional argument is required to be preceded by the preceding separators.


Exemplos

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

Ordena o intervalo A2:C7 pela primeira coluna em ordem crescente e pela terceira coluna em ordem decrescente.

Informação técnica

tip

Esta função está disponível desde o LibreOfficeDev 24.8.


Esta função não faz parte do padrão Open Document Format for Office Applications (OpenDocument) Versão 1.3. Parte 4: Formato de Fórmula Recalculada (OpenFormula). O espaço de nomes é

COM.MICROSOFT.SORTBY