Making a top 10 of the most common text values in Google Sheets

Viewed 24

So I've found many answered questions that almost do what I want to. I just cannot figure out why I can't get anything working.

I'm using a Google Sheets file with multiple sheets in it. I have a long list of names and want to display a top 10 of the most common names and how many occurrences there are.

[The end result would be something like this, except I'd move the table to another sheet]1

This seems to do exactly what I want to do, but it does not work in Google Sheets: https://exceljet.net/formula/10-most-common-text-values

1 Answers

Use query to groupby and sortn to sort and limit to top 10

=SORTN(QUERY(A1:A15,"select A, count(A) group by A"),10,1,2,0)
Related