# MODE.SNGL function

MODE.SNGL(firstParameter, otherParameters...) MODE.SNGL(firstParameter; otherParameters...)

## firstParameter

Number, Logical, Text, Color, { Number }, { Logical }, { Text } or { Color }

The first parameter.

## otherParameters

Number, Logical, Text, Color, { Number }, { Logical }, { Text } or { Color } (accepts many)

## Returns

Number, Logical, Text or Color

The value that appears most frequently. If there are multiple such values, the smallest such value is returned.

Returns the value that appears most frequently. MODE.SNGL(1, 2, 2, 3)MODE.SNGL(1; 2; 2; 3) returns 2, because 2 appears two times in the array, and 1 and 3 only appear once.

If there are multiple values that appear the same number of times, and there is no other value that appears more frequently, the smallest such value is returned. MODE.SNGL(1, 1, 2, 2, 3)MODE.SNGL(1; 1; 2; 2; 3) returns 1, because while 1 and 2 appear the same number of times, 1 is the smaller value, causing it to be returned instead of 2. To have both 1 and 2 returned, use MODE.MULT instead.

MODE.SNGL is typically used with numbers. (Indeed, spreadsheets only support this usage.) However, MODE.SNGL can be used with colors, logical values and text strings too. This formula returns "a":

MODE.SNGL("a", "a", "b")MODE.SNGL("a"; "a"; "b")

When values need to be compared to one another to determine which is smallest, this function uses the same technique as SORT.

## Examples

MODE.SNGL(1, 2, 2, 3)MODE.SNGL(1; 2; 2; 3)

Returns 2, because 2 appears two times in the array, and 1 and 3 only appear once.

MODE.SNGL({ 1, 2, 2, 3 })MODE.SNGL({ 1; 2; 2; 3 })

Returns 2, because 2 appears two times in the array, and 1 and 3 only appear once. Arrays are supported.

MODE.SNGL({ 1, 2 }, 2, 3)MODE.SNGL({ 1; 2 }; 2; 3)

Returns 2, because 2 appears two times in the array, and 1 and 3 only appear once. Arrays mixed with regular values are supported.

MODE.SNGL({ 1, 1, 2, 2, 3 })MODE.SNGL({ 1; 1; 2; 2; 3 })

Returns 1, because while 1 and 2 appear the same number of times, 1 is the smaller value, causing it to be returned instead of 2. To have both 1 and 2 returned, use MODE.MULT instead.

MODE.SNGL("a", "a", "b")MODE.SNGL("a"; "a"; "b")

Returns "a". MODE.SNGL supports colors, logical values and text strings in addition to numbers.