Search code examples
google-sheetsgoogle-sheets-formulacountinggoogle-sheets-querygoogle-query-language

How do I find the most common value in more than one column?


When given multiple columns or rows, is there a formula that would return the most common value in the range? Example:

enter image description here

The formula would return Bird in the example above given columns A and B because Bird shows up 4 times, more than any other value.


Solution

  • try:

    =INDEX(QUERY({A:A; B:B}, 
     "select Col1,count(Col1) 
      group by Col1 
      order by count(Col1) desc"), 2, 1)
    

    0