Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I return the most frequently occurring text value in range of text values in a Google Docs spreadsheet?

I have a range B2:B7 which contains text values that stand for something, but what I want is to have a cell display the text value that comes up the most in that range.

So for example if my range contained the text values {"red", "green", "green", "blue", "green", "blue"}, the average value displayed in the cell would be "green".

How do I do this?


1 Answers

=SORTN(A1:A7,1,2,COUNTIF(A1:A7,A1:A7),0)


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!