Search code examples
google-sheetsgoogle-sheets-formulaformulaspreadsheetgoogle-query-language

Automatically Combine Duplicate Value and Rank


In Google Sheets, I am trying to rank a table of people to find out who contributes the highest numbers.

Sometimes one person contributes multiple times so I need to sum them up before ranking.

enter image description here

The issue is the table will be updated with new names every few hours so I don't want to use SUMIF and manually add those new names. Is there a formula to automate that process? Thanks!


Solution

  • try in E2:

    =INDEX(QUERY(A2:B; 
     "select A,sum(B) 
      where B is not null 
      group by A 
      order by sum(B) desc 
      label sum(B)''");; 1)