Google Spreadsheets-Find top five values in a column

I have a column in a Google Spreadsheet where each cell contains a single word. I need to find the top five most occurring words. Does anybody know how I can achieve this?

2

2 Answers

=query(A:A,"select A,count(A) group by A order by count(A) desc limit 5 label A 'Word',count(A) 'Frequency' ") 

Start with a 'helper' column. In an unused column to the right use this formula in the row containing the first word then fill down.

=if(countif(A$2:A2, A2)=1, countif(A$2:A, A2), "") 

Now you can build your list of 'top five most occurring words' with this formula in another column.

=index(A$2:A, match(large(B$2:B, row(1:1)), B$2:B, 0)) 

Linked sample worksheet

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like