Formualizer Docs

N

Converts a value to its numeric representation.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=N(value)

Arguments

ArgumentTypeRequiredDefault
valueanyRequired—

Remarks

  • Numbers pass through unchanged; booleans convert to 1/0.
  • Text and blank values convert to 0.
  • Errors propagate unchanged.
  • Temporal values are converted using serial number representation.

Examples

Convert a logical value to its numeric equivalent.

Formula =N(TRUE)

Expected result 1

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Test the numeric-looking text case.

Formula =N("17")

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Convert the false logical value at the zero boundary.

Formula =N(FALSE)

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Preserve the error already present in the input.

Formula =N(1/0)

Expected result #DIV/0!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Text to zero

Formula =N("hello")

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

What does N do with text and blanks?

Text and blank values convert to 0, while existing errors are passed through.

Implementation

Engine source

On this page