N Function - Excel


Overview


The N function in Excel is a useful tool for converting different types of values into a number. This function will return a numeric value when given a variety of inputs.

  • A numerical value will return a numerical value.

  • TRUE will return a value of 1, FALSE will return a value of 0.

  • Any type of text will return a value of 0.

  • A date will return the serial number value for that date.

An example of the N function in Excel

Example:

=N("TRUE")

Syntax:

=N(value)

value: This is the value or expression that you want to convert to a number.


Example: Numerical input


In this example, the N function returns a numerical value for the numerical value.

An example of the N function in Excel with a numerical input

Example: TRUE or FALSE input


In this example, the N function returns the value of 1 for TRUE and a 0 for FALSE.

Two examples of the N function in Excel, one with a TRUE input value and another with a FALSE input value

Example: Text input


In this example, the N function returns the value of 0 for a text input.

An example of the N function in Excel with a text input

Example: Date input


In this example, the N function returns the value of the serial number of the date input.

An example of the N function in Excel with a date input

Interactive GSheet