# N function

**N**(value)

**N**(value)

## value

The value to convert.

## Returns

The converted number.

Converts a value to a number. This function is primarily used to convert logical values to numbers (where TRUE is converted to 1 and FALSE is converted to 0). Text strings are converted to 0 and errors and numbers are returned unchanged. Colors are converted as though the TONUMBER function was used.

The -- operator is equivalent to this function, except for the fact that it does not accept text strings. The TONUMBER function is also equivalent, except for the fact that it tries to convert numeric text strings to numbers, while this function returns 0 when asked to convert a text string.

## Examples

Returns 42.

Returns 0.

Returns 0.

Returns 0.

Returns 1.