I have a list of several hundred product codes (alphanumeric) and I’m trying to get a list of the top 20 i.e. the 20 items which occur the most.
I’m only able to make a formula that gets the single most popular item. I’m struggling to figure out how to extend it to include the second and third most popular etc…..
=INDEX(A2:A368,MODE(MATCH(A2:A368,A2:A368,0)))
Any help would be greatly appreciated.
>Solution :
Another way as commented above:
=LET(α, A2:A368, TAKE(UNIQUE(SORTBY(α,COUNTIF(α,α),-1)),20)