Forum Discussion

BF_UK's avatar
BF_UK
Copper Contributor
Mar 15, 2023
Solved

Top n most common entries in an array of numbers and how often they occur

I have a 3 column x 1000 row array that contains a variety of numbers in one or more of the columns i.e. for any given row it might have a different entry in each of the 3 columns or it may simply ha...
  • OliverScheurich's avatar
    Mar 15, 2023

    BF_UK 

    =TAKE(SORT(HSTACK(UNIQUE(TOCOL(B1:D1000)),BYROW(UNIQUE(TOCOL(B1:D1000)),LAMBDA(row,COUNTIF(B1:D1000,row)))),2,-1),10)

    You can try this formula which works in my sheet.

Resources