Summary
To find the most frequently occurring number in a range, you can use the MODE function. In the example shown, the formula in M4 is:
=MODE(B4:K4)
Generic formula
=MODE(range)
Explanation
The MODE function is fully automatic and will return the most frequently occurring number in a set of numbers. For example:
=MODE(1,2,4,4,5,5,5,6) // returns 5
In the example shown, we give MODE the range B4:K4, so the formula is solved like this:
=MODE(B4:K4)
=MODE({1,2,2,1,1,2,2,2,1,1})
=2