The rest of the formula just constructs a filtered array for MODE to use in each row.

As you copy the formula down into subsequent rows, you will likely run into the #N/A error.

For example, =MODE(1,2,4,4,5,5,5,6) returns 5.

Excel formula: Most frequently occurring text

MATCH supports approximate and exact matching, andwildcards(* ?)

Often, MATCH is combined with the…

Excel formula: Most frequently occurring number

Excel formula: Filter values in array formula

Excel MODE function

Excel ISNUMBER function

Excel MATCH function