Forum Discussion

Guilherme_Garibaldi's avatar
Guilherme_Garibaldi
Copper Contributor
Oct 06, 2021
Solved

office 365 formula classificar

Boa noite a todos, alguém sabe como fazer com que a formula classificar apenas traga os 3 ou 4 primeiros informações como se fosse um ranking. Quando faz a formula classificar em uma tabela de 400 linhas ou mais ela traz todas as informações em ordem que eu indico, mas so quero algumas.

  • Guilherme_Garibaldi's avatar
    Guilherme_Garibaldi
    Oct 12, 2021
    Obrigado pela ajuda, funcionou, apenas preciso me entender com na fórmula, mas funciona.

10 Replies

  • byundt's avatar
    byundt
    Brass Contributor

    I assume you are using the SORT function to return your results. If so, consider wrapping it with the INDEX function.

     

    The following formula returns the first four values returned by SORT in a column. If you want them returned as a row, use commas instead of semicolons in the array constant {1;2;3;4}. Formula 3 using INDICE was produced using the Functions Translator Add-in using my USA formula as input and Portuguese as the output--I hope it has the list separators correct.

    =INDEX(SORT(A2:A400,,1),{1;2;3;4})
     
    =ÍNDICE(SORT(A2:A400;;1);{1;2;3;4})

     

      • byundt's avatar
        byundt
        Brass Contributor

        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

    • PeterBartholomew1's avatar
      PeterBartholomew1
      Silver Contributor
      Interesting add-in. My guess is that 1 will create a column with English settings, whilst 3 will produce a row with Portuguese settings.

Resources