Information
N function: convert TRUE/FALSE to 1/0 and embed inline formula comments
Turn logical checkboxes into 1/0 numbers and document complex formulas inline with + N("explanation") using N.
How N converts every spreadsheet data type
N(value) converts non-numeric values using deterministic rules: numbers stay unchanged, dates return their serial number, TRUE becomes 1, FALSE becomes 0, and regular text strings become 0.
Because N("any text") always equals 0, financial modelers append + N("2026 rush surcharge tier") directly inside a numeric formula to leave self-documenting audit notes.
| Input (A) | N(A) Result | Practical Use |
|---|---|---|
| TRUE | 1 | Convert boolean flag to 1 |
| FALSE | 0 | Convert boolean flag to 0 |
| "Audit note" | 0 | Add +N("note") inside math formulas |
| 125 | 125 | Numbers pass through untouched |
Apply a boolean surcharge flag and document the formula inline
When RushOrder (B2) is TRUE, BaseFee * (1 + 0.2 * N(B2)) + N("20% rush fee when TRUE") adds 20% cleanly ($125 -> $150) while documenting why 0.2 is there.
=A2 * (1 + 0.2 * N(B2)) + N("20% rush fee when RushOrder is TRUE")Contrast N("125") = 0 with VALUE("125") = 125
Do not use N() to parse numbers stored as text: N("125") returns 0 because text maps to 0! Use VALUE("125") when parsing numeric strings.
=N("125")Try the example
Use the original values or change them to test your understanding.