Excel - N Function



N Function

The Excel N function transforms a value into a number. It is listed under the Excel Information Functions. You may also combine the N function with other functions like SUM, IF, FILTER, INDIRECT, etc. Interpreting the non-numeric and the Boolean values, such as adding Boolean values, can be achievable through this function. If the Value contains the Date, the N function transforms it into the Date Serial Number.

Compatibility

This advanced Excel function is compatible with the following versions of MS Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2024
  • Excel 2024 for Mac
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2016
  • Excel 2013
  • Excel 2010
  • Excel 2007

Syntax

The syntax of the N function is as follows −

=N(value)

Arguments

You can use the following arguments with the N function −

Argument Description Required / Optional
Value A numeric value or cell reference, the computed value of the specific formula.

N transform values are listed in the table below.

Required
Value Return Value of N
A numeric value That numeric value
A date specified in the built-in date formats presented in Microsoft Excel That serial number date
TRUE 1
FALSE 0
An error value, such as #DIV/0! The error value
Anything else 0

Points to Remember

  • There is no usage to implement the N function when computing the specific formula, as the values are automatically transformed into numbers whenever required.

Examples of N Function

Practice the following examples to learn the use of the N function in Excel.

Example 1: How to Implement the N Function in Excel?

Solution

Step 1 − Assume the sample dataset, where different data values are presented in the Value column. You can select the cell range B3:B14 and write the formula =N(B2) in the formula bar.

How to Implement the N Function in Excel1

After that, press the "Ctrl + Enter" shortcut keys to get the computed values of the N function in the selected range.

How to Implement the N Function in Excel2

As you can notice in the screenshot, the date 22-10-2012 specified in the B6 cell is transformed into the date serial number 41204. The numbers and errors will remain the same when evaluating the N function.

Example 2: Adding of the Boolean Values

Solution

If you try to compute the expression =SUM(A1:A12) where the cell references point to the boolean values. Then, this expression gives you the result of 0. To resolve this problem, you can use the N function to convert the TRUE/FALSE values with 1/0 values and then apply the SUM function to get the summation of the Boolean values.

Step 1 − Consider the sample dataset, where the list of Logical Values is specified in the A column. Select the cell range C2:C12, enter the formula =N(B2) in the formula bar, and hit Enter.

Adding of the Boolean Values2

Therefore, the resulting values are displayed in the C2:C12 cell.

Adding of the Boolean Values3

Step 2 − After that, enter the formula =SUM(B2:B12) in the C13 cell.

Adding of the Boolean Values4

After that, press the Enter tab to obtain the value.

Adding of the Boolean Values5

Download Practice Sheet

You can download and use the sample data sheet to practice the N function.

Advertisements