[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

N

Syntax:

N ( value )

Description: Converts value to a number or, if value is a reference to a single cell, converts the value of that cell to a number.

Arguments:

Name

Type

Description

value

any

Value to be converted.

 

Return Type and Value: number or error – An integer that is the converted value of value, or, if value is a reference to a single cell, the converted value of that cell, as follows:

value

Value Returned

number

That number

TRUE

1

FALSE

0

error value

That error value

Anything else (including array and text)

0

 

[Example:

N(10.5) results in 10.5
N(A10) results in -1234, when A10 contains the number -1234
N("ABC") results in 0
N(A10) results in 0, when A10 contains the string ABC
N(TRUE) results in 1
N(A10) results in 0, when A10 contains FALSE
N(A10) results in #N/A, when A10 contains #N/A
N({12.5,13.6,56.9} results in 12.50
N(A10:A11) results in 0, when A10 contains FALSE, and A11 contains 321

end example]