Forum Discussion
office 365 formula classificar
- Oct 12, 2021Obrigado pela ajuda, funcionou, apenas preciso me entender com na fórmula, mas funciona.
Estou usando a formula classificarpor.
Here is the same approach using SORTBY. Note the use of curly braces surrounding the array constant {1;2;3;4}
=ÍNDEX(SORTBY(A2:A400,B2:B400),{1;2;3;4}) USA Excel
=ÍNDICE(SORTBY(A2:A400;B2:B400);{1;2;3;4}) Portuguese Excel
- Guilherme_GaribaldiOct 07, 2021Copper Contributorentendi, pra mim a formula até funcionou, mas ela so tras a primeira coluna nao esta puxando o resto das informações.
- byundtOct 07, 2021Brass ContributorExcel formulas do not work on "arrays of arrays" at the moment.
But you could copy across a formula that returns the top four in each column like:
=ÍNDEX(SORTBY(A2:A400,$B2:$B400),{1;2;3;4}) USA Excel
=ÍNDICE(SORTBY(A2:A400;$B2:$B400);{1;2;3;4}) Portuguese Excel- byundtOct 07, 2021Brass Contributor
Microsoft added some new functions very recently to the Beta Channel of Microsoft 365. One of these functions is called MAKEARRAY, and can be used to return your results with a single formula in a single cell. It works with another recently added function LAMBDA, which lets you plug values into a formula.
As shown below, the formula returns a three column array of results for the top four rows returned by SORTBY function. I realize that you likely do not have the newly added functions, but am posting the suggestion because it was fun to figure out, and might be useful to somebody else in the future.
=MAKEARRAY(4,3,LAMBDA(r,c,INDEX(SORTBY(A2:C400,B2:B400),r,c)))