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
| Argument | Type | Required | What it does |
|---|---|---|---|
value | any | yes | The value to convert to a number. |
Examples
The examples use this table, starting in A1:
| Value | Text | Flag | Date |
| 42 | hello | True | 46096 |
=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.