Excel N Function

Summary

The Excel N function returns a number when given a value. The N function can be used to convert TRUE and FALSE to 1 and 0 respectively. When given a text value, the N function returns zero.

Purpose

Convert a value to a number

Return value

A number or error code

Syntax

=N (value)

Arguments

Usage notes

Use the N function to convert value to a number. Values are converted according the the following table:

Input valueReturn value
Any numberSame number
A recognized dateA date in Excel serial number format
TRUE1
FALSE0
An error code (#VALUE, #N/A, etc)Same error code
Other values0

In most cases, using the N function is unnecessary, because Excel automatically converts values when needed.

The N function is provided for compatibility with other spreadsheet programs.

Excel N Function

Summary

The Excel N function returns a number when given a value. The N function can be used to convert TRUE and FALSE to 1 and 0 respectively. When given a text value, the N function returns zero.

Purpose

Convert a value to a number

Return value

A number or error code

Syntax

=N (value)

Arguments

Usage notes

Use the N function to convert value to a number. Values are converted according the the following table:

Input valueReturn value
Any numberSame number
A recognized dateA date in Excel serial number format
TRUE1
FALSE0
An error code (#VALUE, #N/A, etc)Same error code
Other values0

In most cases, using the N function is unnecessary, because Excel automatically converts values when needed.

The N function is provided for compatibility with other spreadsheet programs.