Going Stellar

Home/Google Sheets reference

Google Sheets function · Info

N in Google Sheets: syntax and examples

N returns the numeric form of a value: numbers pass through, TRUE becomes 1, dates become serial numbers and text becomes 0. It is handy for adding mixed cells without a #VALUE! from stray text.

Syntax

N(value)

Arguments

ArgumentTypeRequiredWhat it does
valueanyyesThe value to convert to a number.

Examples

The examples use this table, starting in A1:

ValueTextFlagDate
42helloTrue46096
=N(A2)

Result: 42

A number stays as it is.

Run in a Google Sheet (English US locale) on .

=N(B2)

Result: 0

Text becomes 0.

Run in a Google Sheet (English US locale) on .

=N(C2)

Result: 1

TRUE becomes 1.

Run in a Google Sheet (English US locale) on .

=N(D2)

Result: 46096

A date comes back as its serial number.

Run in a Google Sheet (English US locale) on .

=SUM(N(A2), N(B2), N(C2))

Result: 43

Mixed cells added safely: 42 + 0 + 1.

Run in a Google Sheet (English US locale) on .

Common errors

  • Text that looks like a number, such as "7", still returns 0.
  • An error passes through unchanged: N(1/0) returns #DIV/0!.
  • A range of several cells returns #VALUE!.
  • A date comes back as a serial number, for example 46096, not as a formatted date.

Compared with Excel

Same syntax in Excel.

Sources

  1. N (Docs Editors Help)

Markdown version · All functions