Practice free

N function

N converts a value to a number: numbers stay as they are, TRUE becomes 1, dates give serial numbers and anything else gives 0. It mostly shows up in old formulas and as a trick for adding comments.

Example

Read it as a sentence: turn the value in F3 into a plain number, which gives 45351.

Practice this in the app

Syntax

N(value)

value (required)
The value to convert.

Returns: A number: numbers stay, TRUE is 1, dates give serials, anything else 0.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=N(5) 5 Number
=N("5") 0 Text
=N(TRUE) 1 Bool
=N({1,"a"}) 1 Array
=N(Data!F3) 45351 Date cell
=N(Data!F1) 0 Blank
=N(Items!B2) 0 Text cell
=N(Data!F5) #DIV/0! Error cell

The Data sheet these formulas read

A cell that starts with = holds that formula.

The Items sheet these formulas read

Watch out for

  • Text becomes 0, even "7".
  • Only the first item of an array is used.

Where it works

Excel
N is in every version of Excel from 2007 on.
Google Sheets
Same name, same behaviour for everyday use.

Part of Information functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .