This is an advanced formula that requires a number ofnestedfunctions.

However, it is an excellent example of the power ofdynamic array formulas in Excel.

For convenience,datais thenamed rangeB5:B104.

Counts for all 23 values unsorted

This range contains 100 random color names.

This might impact performance in larger sets of data.

To streamline the formula, we can use theLET function.

Counts for all 23 values unsorted

The LET function is used to declare and assign values to variables.

Then we replace UNIQUE(data) withuwhere it occurs in the formula.

The result is that UNIQUE values are calculated just one time.

Counts for all 23 values unsorted

Values can be sorted by one or more columns.

SORT returns a dynamic array of results.

TAKE Function

The Excel TAKE function returns a subset of a given array.

Counts for all 23 values unsorted

The number of rows and columns to return is provided by separaterowsandcolumnsarguments.

Rows and columns can be extracted from the start or end of the given array.

Counts for all 23 values unsorted

Most common text values sorted by count

The final table, listing just the top 10 values by count, sorted in descending order

Excel formula: Most frequently occurring text

Excel formula: Most frequent text with criteria

Excel formula: Most frequently occurring number

Excel UNIQUE function

Excel COUNTIF function

Excel HSTACK function

Excel SORT function

Excel TAKE function

Counts for all 23 values unsorted

Most common text values sorted by count

The final table, listing just the top 10 values by count, sorted in descending order