N

Returns a value converted to a number.

Syntax

N(value)

Value   is the value you want converted. N converts values listed in the following table.

If value is or refers to

N returns

A number

That number

A date, in one of the built-in date formats available in Microsoft Excel

The serial number of that date

TRUE

1

Anything else

0


Remarks

It is not generally necessary to use the N function in a formula, because Microsoft Excel automatically converts values as necessary. This function is provided for compatibility with other spreadsheet programs.

Examples

If A1 contains "7", A2 contains "Even", and A3 contains "TRUE", then:

N(A1) equals 7

N(A2) equals 0, because A2 contains text

N(A3) equals 1, because A3 contains TRUE

N("7") equals 0, because "7" is text

N("4/17/91") equals 0, because "4/17/91" is text